Skip to content

Commit 57d7fe1

Browse files
committed
Remove unsafe prctl export
1 parent 92e5160 commit 57d7fe1

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

src/sys/prctl.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
//! prctl is a Linux-only API for performing operations on a process or thread.
22
//!
3+
//! Note that careless use of some prctl() operations can confuse the user-space run-time
4+
//! environment, so these operations should be used with care.
5+
//!
36
//! For more documentation, please read [prctl(2)](https://man7.org/linux/man-pages/man2/prctl.2.html).
47
58
use crate::errno::Errno;
@@ -210,20 +213,3 @@ pub fn get_mce_kill() -> Result<PrctlMCEKillPolicy> {
210213

211214
Errno::result(res).map(|res| PrctlMCEKillPolicy::try_from(res).unwrap())
212215
}
213-
214-
/// Manipulates various aspects of the behaviour of the calling process or thread.
215-
///
216-
/// # Safety
217-
/// Note that careless use of some prctl() operations can confuse the user-space run-time
218-
/// environment, so these operations should be used with care.
219-
///
220-
/// For more information, see [prctl(2)](https://man7.org/linux/man-pages/man2/prctl.2.html).
221-
pub unsafe fn prctl(
222-
option: PrctlOption,
223-
arg2: c_ulong,
224-
arg3: c_ulong,
225-
arg4: c_ulong,
226-
arg5: c_ulong,
227-
) -> Result<c_int> {
228-
Errno::result(libc::prctl(option as c_int, arg2, arg3, arg4, arg5))
229-
}

0 commit comments

Comments
 (0)