is_supervised
Function
This function is defined in the protocols module.Return whether the process appears to run under a service manager. Pure predicate. A process is considered supervised when either:
- its parent is PID 1 (
ppid == 1— reparented to init / the container entrypoint), or - the systemd
INVOCATION_IDenvironment variable is present (the unit was started by systemd).
Signature
Parameters
Optional[int]
required
The parent PID, or
None when unavailable.Optional[str]
required
The value of
$INVOCATION_ID, or None/empty.Returns
bool
True when either supervision signal is present.Source
View on GitHub
praisonaiagents/gateway/protocols.py at line 4202
