Lines Matching refs:process

1 use crate::process::Pid;
9 const NOHANG = backend::process::wait::WNOHANG as _;
11 const UNTRACED = backend::process::wait::WUNTRACED as _;
13 const CONTINUED = backend::process::wait::WCONTINUED as _;
34 /// Returns whether the process is currently stopped.
37 backend::process::wait::WIFSTOPPED(self.0 as _)
40 /// Returns whether the process has continued from a job control stop.
43 backend::process::wait::WIFCONTINUED(self.0 as _)
46 /// Returns the number of the signal that stopped the process,
47 /// if the process was stopped by a signal.
51 Some(backend::process::wait::WSTOPSIG(self.0 as _) as _)
57 /// Returns the exit status number returned by the process,
61 if backend::process::wait::WIFEXITED(self.0 as _) {
62 Some(backend::process::wait::WEXITSTATUS(self.0 as _) as _)
68 /// Returns the number of the signal that terminated the process,
69 /// if the process was terminated by a signal.
72 if backend::process::wait::WIFSIGNALED(self.0 as _) {
73 Some(backend::process::wait::WTERMSIG(self.0 as _) as _)
80 /// `waitpid(pid, waitopts)`—Wait for a specific process to change state.
82 /// If the pid is `None`, the call will wait for any child process whose
83 /// process group id matches that of the calling process.
86 /// process.
89 /// for any child process with a group ID equal to the `wrapping_neg` of `pid`.
91 /// Otherwise, the call will wait for the child process with the given pid.
93 /// On Success, returns the status of the selected process.
95 /// If `NOHANG` was specified in the options, and the selected child process
107 Ok(backend::process::syscalls::waitpid(pid, waitopts)?.map(|(_, status)| status))
110 /// `wait(waitopts)`—Wait for any of the children of calling process to
113 /// On success, returns the pid of the child process whose state changed, and
114 /// the status of said process.
116 /// If `NOHANG` was specified in the options, and the selected child process
128 backend::process::syscalls::wait(waitopts)