Expand description
Environment-marker contract between the supervisor and the detached agent and MCP children it spawns.
The supervisor stamps these markers at spawn time; shutdown and
reconciliation read them back from /proc/<pid>/environ to confirm a
registry PID still names this installation’s child before signalling it.
PIDs are recycled, and group-signalling a stale PID (kill(-pid)) could
reach an unrelated session leader — so a row is only ever signalled once
both the subprocess marker and the exact name_key=service_name pairing
are found.
Constants§
Functions§
- environ_
identifies_ child - is_
zombie - Reports whether
pidis a zombie — terminated but not yet reaped. - live_
pid_ is_ subprocess - Confirm a live PID still names this installation’s child by reading its
/proc/<pid>/environand matching the spawn markers. - signalable_
pid - Convert an OS process id into the signed form
kill(2)expects, rejecting any value that would target more than that single process.