Skip to main content

looks_like_devflow_process

Function looks_like_devflow_process 

Source
pub fn looks_like_devflow_process(pid: u32) -> bool
👎Deprecated:

unsound alone (999.47) – use is_same_process with a recorded start time

Expand description

Best-effort, Linux-only identity check for devflow stop’s signalling fallback (T-23-52, PID reuse in a stale lock file): does /proc/<pid>/cmdline name a devflow process? Reads the NUL-separated argv and reports whether any argument’s file-name component starts with devflow. Returns false when the file cannot be read (process exited between the liveness check and this call, non-Linux, permission denied) — the fail-closed direction. A false return means “identity could not be confirmed,” and callers must treat that as “do not signal,” never as “signal anyway.”

UNSOUND ON ITS OWN — see 999.47. This returns true for any freshly forked child of a devflow process that has not yet completed execve, because such a child transiently carries its parent’s cmdline. It is retained only as a secondary, advisory signal; prefer is_same_process with a recorded start time, which cannot be fooled this way. Never let this function alone authorise a signal.