Struct Process

pub struct Process { pub(in ::sys::process::unix::unix) pid: pid_t, pub(in ::sys::process::unix::unix) status: Option<ExitStatus>, pub(in ::sys::process::unix::unix) pidfd: Option<PidFd> }

The unique ID of the process (this should never be negative).

Fields

pid: pid_t
status: Option<ExitStatus>
pidfd: Option<PidFd>

Implementations

impl Process

unsafe fn new(pid: pid_t, pidfd: pid_t) -> Self

Safety

pidfd must either be -1 (representing no file descriptor) or a valid, exclusively owned file descriptor (See I/O Safety).

fn id(&self) -> u32
fn kill(&self) -> Result<()>
fn send_signal(&self, signal: i32) -> Result<()>
fn send_process_group_signal(&self, signal: i32) -> Result<()>
fn wait(&mut self) -> Result<ExitStatus>
fn try_wait(&mut self) -> Result<Option<ExitStatus>>

Auto Trait Implementations

impl Freeze for Process

impl RefUnwindSafe for Process

impl Send for Process

impl Sync for Process

impl Unpin for Process

impl UnsafeUnpin for Process

impl UnwindSafe for Process

Blanket Implementations

impl<T> Any for Process where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Process where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Process where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Process

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for Process where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for Process

impl<T, U> Into<U> for Process where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Process where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for Process where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>