MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / set_executable_file

Function set_executable_file

src/process/prctl.rs:688–691  ·  view source on GitHub ↗
(fd: BorrowedFd<'_>)

Source from the content-addressed store, hash-verified

686#[doc(alias = "PR_SET_MM")]
687#[doc(alias = "PR_SET_MM_EXE_FILE")]
688pub fn set_executable_file(fd: BorrowedFd<'_>) -> io::Result<()> {
689 let fd = usize::try_from(fd.as_raw_fd()).map_err(|_r| io::Errno::RANGE)?;
690 unsafe { prctl_3args(PR_SET_MM, PR_SET_MM_EXE_FILE as *mut _, fd as *mut _) }.map(|_r| ())
691}
692
693/// Set a new auxiliary vector.
694///

Callers

nothing calls this directly

Calls 2

prctl_3argsFunction · 0.85
as_raw_fdMethod · 0.45

Tested by

no test coverage detected