pub enum ProcessState {
Running,
Sleeping,
UninterruptibleSleep,
Zombie,
Stopped,
Traced,
Idle,
Dead,
Unknown,
}Expand description
The kernel scheduling state of a process.
Variants§
Running
Running or runnable.
Sleeping
Interruptible sleep, the normal idle state.
UninterruptibleSleep
Uninterruptible sleep, usually blocked in the kernel on I/O.
§7.2 requires this to be visibly distinct: an accumulation of D-state
processes is a storage or NFS problem, not idleness.
Zombie
Exited but not reaped by its parent.
§7.2 requires this to be visibly distinct, and §11.2 has a rule for it.
Stopped
Stopped by a job-control signal.
Traced
Stopped by a debugger.
Idle
Idle kernel thread. Linux I, and the state macOS reports for a
suspended process.
Dead
Being torn down.
Unknown
The platform reported something we do not model.
Implementations§
Source§impl ProcessState
impl ProcessState
Sourcepub const fn code(self) -> char
pub const fn code(self) -> char
The single-character code shown in the STATE column.
Deliberately the familiar ps letters, so existing knowledge transfers.
Sourcepub const fn is_notable(self) -> bool
pub const fn is_notable(self) -> bool
Whether §7.2 requires this state to be rendered distinctly.
Sourcepub const fn is_signalable(self) -> bool
pub const fn is_signalable(self) -> bool
Whether signalling this process can have any effect.
A zombie has already exited; signalling it is a no-op and the confirmation dialog says so rather than pretending to act (§15.1).
Trait Implementations§
Source§impl Clone for ProcessState
impl Clone for ProcessState
Source§fn clone(&self) -> ProcessState
fn clone(&self) -> ProcessState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more