Expand description
Pid-reuse-safe process liveness.
What assembly::discovery (the daemon singleton lock) asks of a recorded
holder: is this pid still the process that wrote it, or did the pid get
recycled by something unrelated.
Structs§
- Process
Identity - A process, identified precisely enough to answer “is this still the same process I saw before, or did its pid get recycled?” — a bare pid can’t answer that on its own.
Enums§
- Process
Liveness - Stale
Lock Decision - What a caller weighing whether to reclaim a stale lock/discovery file
should do, given a
ProcessLiveness.
Functions§
- decide_
stale_ lock - Runs
ProcessIdentity::checkagainstrecordedand logs the decision viatracing, so call sites just branch on the result instead of each re-matching all fourProcessLivenessvariants and re-writing the same log lines.subjectnames what’s being checked (e.g."daemon.lock") andpathis where it lives on disk — both go into the log for post-mortem debugging. - process_
start_ time pid’s process start time as Unix epoch seconds (rounded to the nearest second — seeProcessIdentity::check’s tolerance for why sub-second precision isn’t needed), orNoneif it can’t be determined (process gone by the time we looked,psunavailable, or a read/parse failure — all treated the same by callers: “couldn’t verify, can’t use this for the reuse check”).