[FEATURE] Implement real fork, exec, wait, signals and terminal process groups #3
Labels
No labels
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/posixd#3
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
Build processes and shell job control require real process snapshots, replacement, child status and signal delivery. Descriptive subshell state or spawn-only substitutes do not establish fork semantics or safe process control.
Proposed behavior and scope
Implement correctness-first fork, atomic publication/unwind, exec replacement, required spawn actions, wait/zombie retirement, signal state and handlers, groups/sessions and real resource counters. Validate concurrent children, threaded fork, descriptor inheritance, terminal control and exhaustion recovery.
This issue records planned work; its unchecked criteria are not implementation proof. The normative basis is Phase 6 and AC1–AC24.
Authority, security and reliability
Duplicate only authorized memory and descriptor rights; never copy private service receive authority. Bind signal/group/child operations to live generations inside the realm, validate restored CPU state, and retire descendants and pending exceptional grants on failure or termination.
Apply the priority order: security, reliability, then performance. Keep suspected vulnerabilities in the repository’s restricted SECURITY.md reporting channel.
Acceptance criteria
open descriptions and allowed capability inheritance. A shell's descriptive subshell
checkpoint is not a process fork.
reviewed copy-on-write mechanism is justified; duplicate only selected memory/descriptor
rights, never a service's private receive authority.
transfer or startup failure; parent state remains usable and no half-started child or leaked
authority remains.
realm policy, argv/env, inherited descriptors and signal rules; success replaces the image,
failure preserves the prior process.
inheritance/security semantics and test fork/exec equivalence where specified. Do not fake
fork by always taking a spawn-only path.
retirement, multiple waiters, interruption and PID reuse safety.
delegated namespaces; numeric group IDs cannot grant control.
unblock ordering and supported signal sets with explicit state.
restored context and async-signal-safe runtime paths; never unwind across unauthorized frames
or trust caller-provided privileged CPU state.
stop/continue and terminal job-control behavior required by the profile.
elapsed wall time and child CPU time remain distinct.
environment, cwd, TLS, signals, multi-thread fork, failures, concurrent children and
termination while authority demand is pending.
repeated fork/exec exhaustion/recovery VMs; verify no residual caps.
For each implementation slice, retain actual formatting, strict Clippy, unit/doctest and warning-denied build results for all altered Rust repositories and valid configurations. Add relevant runtime VM coverage, monitor older unit/VM regressions in exact-head CI, and update canonical component documents and affected technical-manual/API material. Every authored code file must remain below 1,000 physical lines, with meaningful inline documentation and missing_docs enforcement in Rust crates.
Alternatives and tradeoffs
Copy-on-write may improve fork cost later but requires separate correctness and revocation evidence. Start with reviewed private copying and retain native process boundaries instead of pretending every fork is a spawn.
Tracking and rollout
Dependencies: posixd#1, posixd#2, kernel#1
Dependencies identify required contracts and closure gates; preparatory inventory/design can proceed in parallel under one owner per edited file. Link bounded implementation issues and their PRs here before claiming acceptance. Use
feature/posix-compat, regular signed commits in the canonical contribution format, and WIP PRs linked to the exact coherent component graph. All cross-repository Cargo/catalog selections and CI helpers use full 40-character lowercase commit hashes, including transitive dependencies; do not substitute branch, tag or implicit HEAD selection.Close criteria only with their own reviewed deliverables and validation evidence. Pending, skipped, cancelled, failed or predecessor-only results remain distinct. Keep main images unchanged until explicit promotion direction; technical completion does not authorize merges, release tags or publication.
[FEATURE] [P09] Implement real fork, exec, wait, signals and terminal process groupsto [FEATURE] Implement real fork, exec, wait, signals and terminal process groups