Skip to main content

Module subprocess

Module subprocess 

Source
Expand description

Identity contract for the detached agent and MCP children the supervisor owns: the environment markers stamped at spawn time and the pure parsers that read them back off a live process image.

The supervisor stamps SUBPROCESS_MARKER_ENV and a name_key=service pair into every child; shutdown, reconciliation, and port reclamation 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 marker and the exact pairing are found.

Spawning and the platform-specific process probes live in systemprompt_loader::subprocess; this module holds only data and pure functions so the shared layer stays free of process I/O.

Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.

Constants§

AGENT_NAME_ENV
DEPLOYMENT_HOST_ENV
MCP_SERVICE_ID_ENV
SUBPROCESS_MARKER_ENV

Functions§

deployment_host
environ_from_procargs2
environ_identifies_child
identity_verification_supported
inherited_parent_env
is_deployment_host
signalable_pid