Skip to main content

process_started_at

Function process_started_at 

Source
pub fn process_started_at(pid: u32) -> Option<String>
Expand description

An opaque marker identifying which process currently holds pid, not merely whether the number is in use — the OS-reported moment it started. Compared only for equality by the caller, never parsed as a timestamp: the two platform formats are not on the same scale, and nothing here needs to be.

A live pid alone never proves it is the process a caller thinks it is — pids get reused, sometimes within minutes on a busy machine — so crate::run::RunState::liveness uses this to corroborate a driver_pid that answered pid_status(..) == Some(true): it records this marker alongside the pid, and a later mismatch means a different process now answers to that number, not that the original one is somehow still running under it. None when the platform could not say — a caller must treat that exactly like an unavailable pid_status query, not as either a match or a mismatch.