(pid: Pid, flags: PidfdFlags)
| 606 | |
| 607 | #[cfg(target_os = "linux")] |
| 608 | pub(crate) fn pidfd_open(pid: Pid, flags: PidfdFlags) -> io::Result<OwnedFd> { |
| 609 | syscall! { |
| 610 | fn pidfd_open( |
| 611 | pid: c::pid_t, |
| 612 | flags: c::c_uint |
| 613 | ) via SYS_pidfd_open -> c::c_int |
| 614 | } |
| 615 | unsafe { |
| 616 | ret_owned_fd(pidfd_open( |
| 617 | pid.as_raw_nonzero().get(), |
| 618 | bitflags_bits!(flags), |
| 619 | )) |
| 620 | } |
| 621 | } |
| 622 | |
| 623 | #[cfg(target_os = "linux")] |
| 624 | pub(crate) fn pidfd_send_signal(pidfd: BorrowedFd<'_>, sig: Signal) -> io::Result<()> { |
nothing calls this directly
no test coverage detected