[FEATURE] Declare optional terminal lifecycle authority #25
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/launchd#25
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and motivation
Native command startup should give each command only the terminal operations its authenticated manifest declares. Commands that only read or write streams do not need the session-owner lifecycle endpoint.
Proposed behavior and scope
Add an explicit session-lifecycle manifest bit. Launchd derives the optional child destination only from the authenticated manifest; executable names, arguments and stream selections cannot enable it. Preserve the existing destination record as a selector, with zero representing no child endpoint where optional destinations are encoded.
Procd keeps its independently owned lifecycle endpoint for process teardown, but installs a child alias only when the selected destination is nonzero. Native startup checks require the exact SEND endpoint when declared and prove that slot absent otherwise. Update the shell, monitor and time-command declarations for their actual lifecycle consumers, plus coordinated catalogs and documentation.
Authority, security and reliability
The declaration bounds installation and grants no authority by itself. Keep exact owner, process generation, destination-window, rights and duplicate-slot checks. Parent and Procd teardown authority remain separate from the child's optional alias. Preserve first-error precedence and stop on uncertain cleanup; do not broaden stream endpoint rights or grant lifecycle access for geometry reads.
Acceptance criteria
Alternatives and tradeoffs
Dropping an unused alias after startup shortens its lifetime but still delegates it. Needs-based installation avoids that grant while preserving the supervisor's own cleanup route. The existing wire destination can carry absence without adding a separate capability namespace.
Tracking and rollout
Coordinate LibIPC, LibCapabi, Launchd, Procd, Exsh, Coreutils, Extop and Integration. Supports native SHA-2 and Phase 6. Keep the selected producer/consumer graph coherent before enabling the new command profile.
LibIPC
b66983f5, LibCapabiebacd400, Launchd903a5cf4and Procd6131bc66implement the optional lifecycle declaration, exact startup inventory and child-alias omission. Procd keeps its own teardown sender. Consumer manifest flags and the coordinated image graph are being migrated before enabling the new profile.