[FEATURE] Add bounded POSIX pipes with atomic publication and native SIGPIPE #24
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/posixd#24
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
Compatibility clients need pipe/pipe2 semantics for shell pipelines and compiler subprocesses. Existing configured byte channels do not provide pipe creation, atomic small writes, or native default SIGPIPE handling.
Proposed behavior and scope
Add a capability-free pipe request returning the two lowest available process-local descriptors. Publish both ends together after accepted native completion, with separate read/write descriptions and atomic NONBLOCK, CLOSE_ON_EXEC and CLOSE_ON_FORK selection. Reserve channel rows and ring bytes from the original explicit realm resource plan; no hidden allocator or implicit quota is introduced.
Preserve FIFO order, atomic writes up to the advertised POSIX pipe bound, larger positive short writes, EOF after the last writer, and EPIPE plus SIGPIPE after the last reader. Retained waits inspect their original description and channel only. Reuse requires complete end retirement and scrubbing of the original buffer. Event-driven poll/select and libc entry points remain separately tracked requirements.
Authority, security and reliability
Only the authenticated live client may allocate its own pair from the sealed realm budget. Numeric descriptors and channel indices carry no native authority. Reservations remain unusable before publication; resource exhaustion and refused results must not leak one end or stale data. Aliases retain original description generations and end counts. Default SIGPIPE termination must use the existing original process controller and exact native client generation; Posixd must not acquire a general process-kill capability. Preserve actual serving/caller custody across cancellation, refusal, uncertainty and terminal cleanup. Blocked, ignored and caught signal policies remain distinct.
Acceptance criteria
Checklist
Alternatives and tradeoffs
Reusing generic short-write channels alone would not satisfy pipe atomicity. Returning EPIPE without SIGPIPE would omit observable behavior. Giving the mediator a general process controller would unnecessarily widen its authority. Use explicitly counted storage and the retained original controller relationship instead. Consult the POSIX pipe contract and POSIX write contract; implementation remains independently authored.
Tracking and rollout
Counted pipes and original-controller default SIGPIPE are implemented and signed/published: lib-ipc
fdbe4e08, lib-posixabi980a332e, posixd645be685, launchddfcb4d7d, procdf198cbf5, exsh165f2613, integrationc51e2f93, docs47a75253. The separate Integration helper60a44c20precedes final catalogs. The coherent closure contains 56 signed commits across 55 repositories, 206 Cargo selectors and 111 catalog selectors, with exact remote branch equality.RCF1/RCP1 version1.5 admits explicit unused rings of at least512 bytes, including pool-only plans without inherited descriptors. Compatibility1.11 adds Pipe opcode21 and matching Rust/C constants. Two lowest-free fd numbers, independent descriptions and one generation-bound counted ring remain unpublished until accepted native COMPLETE. Refusal cancels both ends; native invocation custody remains independently retained. FIFO scalar/vector writes of at most512 bytes are atomic, larger writes may be short, and blocking calls retain the original description and required free-space condition. Final aliases drive EOF/EPIPE; both-end retirement scrubs the whole ring before reuse. Unrelated closure cannot satisfy a wait.
Ignored, blocked and caught SIGPIPE preserve their distinct EPIPE/pending/handoff behavior. Default unblocked SIGPIPE freezes the original client. Posixd authenticates the original controller CLAIM and complete native context/digest before a one-shot policy decision. Procd polls through its existing mediator SEND, reserves both original rows through actual caller retirement, revalidates the original live relationship and issues at most one generation-checked kill. Native terminal observation, accounting, destruction and notification remain independently owned. A retiring original client discharges a drained poll without another kill; uncertain native custody stays fail-stop. Posixd receives no process-control capability, outbound route, ambient discovery or hidden capacity.
Ordinary byte/binding native clients exercise successful pipes, atomic writes, wraparound, alias closure, reuse and nondefault SIGPIPE. The separate realm-pipes scenario selects realm-pipe-client and requires real Killed(SIGPIPE), retained through retirement and reuse; an EPIPE return or normal exit fails that diagnostic. Explicit1024-byte packets and H=4/Q=1038 pool geometry are configured, with872-byte or3432-byte plan arenas. Existing native authority, lender and120-second deadline gates remain. Unit, transcript, selector and packaging controls are authored and unrun. The Exsh transcript ordering defect is repaired and published.
The pipe feature is accepted under that waiver. Event-driven poll/select, complete libc wrappers, asynchronous handlers and other native signal defaults remain separate work. Both full EriX guest-build generations and rebuilding external Rust/LLVM inside EriX remain required and unperformed.
Current progress is 17.84% weighted and 6.41% whole acceptance: 24/460 parents and 454/914 sub-items under 161 decomposed parents. One complete pipe parent and its seven explicit sub-items are accepted; original parent weights are unchanged.
Pipe contract, descriptor/namespace work, Phase6 master. Reviews: lib-ipc, lib-posixabi, posixd, launchd, procd, exsh, integration, docs.
Tracks the pipe requirement in Posixd compatibility support and Phase 6 completion. Coordinate LibPosixABI, LibIPC, Posixd, the original native controller, native clients and Integration. Existing Posixd PR, LibPosixABI PR and Integration PR carry the rollout. Land coherent wire revisions and retire superseded internal paths in the same dependency graph.
erikinkinen referenced this issue from erix/lib-ipc2026-09-30 13:12:16 +02:00
erikinkinen referenced this issue from erix/blockd2026-09-30 13:12:35 +02:00
erikinkinen referenced this issue from erix/coreutils2026-09-30 13:12:36 +02:00
erikinkinen referenced this issue from erix/crashd2026-09-30 13:12:37 +02:00
erikinkinen referenced this issue from erix/deviced2026-09-30 13:12:38 +02:00
erikinkinen referenced this issue from erix/docs2026-09-30 13:12:41 +02:00
erikinkinen referenced this issue from erix/drv-acpi2026-09-30 13:12:42 +02:00
erikinkinen referenced this issue from erix/drv-i80422026-09-30 13:12:43 +02:00
erikinkinen referenced this issue from erix/drv-ps2-keyboard2026-09-30 13:12:44 +02:00
erikinkinen referenced this issue from erix/drv-ps2-mouse2026-09-30 13:12:45 +02:00
erikinkinen referenced this issue from erix/drv-rtc-cmos2026-09-30 13:12:46 +02:00
erikinkinen referenced this issue from erix/drv-serial2026-09-30 13:12:46 +02:00
erikinkinen referenced this issue from erix/drv-virtio-block2026-09-30 13:12:47 +02:00
erikinkinen referenced this issue from erix/dynlinkd2026-09-30 13:12:48 +02:00
erikinkinen referenced this issue from erix/e2fsd2026-09-30 13:12:49 +02:00
erikinkinen referenced this issue from erix/exsh2026-09-30 13:12:51 +02:00
erikinkinen referenced this issue from erix/extop2026-09-30 13:12:52 +02:00
erikinkinen referenced this issue from erix/fatd2026-09-30 13:12:52 +02:00
erikinkinen referenced this issue from erix/fbcond2026-09-30 13:12:53 +02:00
erikinkinen referenced this issue from erix/hotplugd2026-09-30 13:12:53 +02:00
erikinkinen referenced this issue from erix/inputd2026-09-30 13:12:54 +02:00
erikinkinen referenced this issue from erix/integration2026-09-30 13:12:55 +02:00
erikinkinen referenced this issue from erix/irqd2026-09-30 13:12:55 +02:00
erikinkinen referenced this issue from erix/kernel2026-09-30 13:12:56 +02:00
erikinkinen referenced this issue from erix/keyd2026-09-30 13:12:57 +02:00
erikinkinen referenced this issue from erix/launchd2026-09-30 13:12:57 +02:00
erikinkinen referenced this issue from erix/lib-block2026-09-30 13:12:58 +02:00
erikinkinen referenced this issue from erix/lib-bootstrap2026-09-30 13:12:58 +02:00
erikinkinen referenced this issue from erix/lib-capabi2026-09-30 13:12:58 +02:00
erikinkinen referenced this issue from erix/lib-driver2026-09-30 13:12:59 +02:00
erikinkinen referenced this issue from erix/lib-input2026-09-30 13:12:59 +02:00
erikinkinen referenced this issue from erix/lib-interrupt2026-09-30 13:12:59 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-09-30 13:13:00 +02:00
erikinkinen referenced this issue from erix/lib-log2026-09-30 13:13:00 +02:00
erikinkinen referenced this issue from erix/lib-posixabi2026-09-30 13:13:01 +02:00
erikinkinen referenced this issue from erix/lib-service2026-09-30 13:13:01 +02:00
erikinkinen referenced this issue from erix/lib-stdio2026-09-30 13:13:02 +02:00
erikinkinen referenced this issue from erix/lib-time2026-09-30 13:13:02 +02:00
erikinkinen referenced this issue from erix/lib-tty2026-09-30 13:13:02 +02:00
erikinkinen referenced this issue from erix/lib-vfs2026-09-30 13:13:03 +02:00
erikinkinen referenced this issue from erix/loaderd2026-09-30 13:13:03 +02:00
erikinkinen referenced this issue from erix/logd2026-09-30 13:13:03 +02:00
erikinkinen referenced this issue from erix/memd2026-09-30 13:13:04 +02:00
erikinkinen referenced this issue from erix/named2026-09-30 13:13:04 +02:00
erikinkinen referenced this issue from erix/pagerd2026-09-30 13:13:05 +02:00
erikinkinen referenced this issue2026-09-30 13:13:06 +02:00
erikinkinen referenced this issue from erix/powerboxd2026-09-30 13:13:06 +02:00
erikinkinen referenced this issue from erix/probed2026-09-30 13:13:07 +02:00
erikinkinen referenced this issue from erix/procd2026-09-30 13:13:07 +02:00
erikinkinen referenced this issue from erix/ramfsd2026-09-30 13:13:08 +02:00
erikinkinen referenced this issue from erix/rootd2026-09-30 13:13:08 +02:00
erikinkinen referenced this issue from erix/seriald2026-09-30 13:13:09 +02:00
erikinkinen referenced this issue from erix/timed2026-09-30 13:13:09 +02:00
erikinkinen referenced this issue from erix/ttyd2026-09-30 13:13:10 +02:00
erikinkinen referenced this issue from erix/vfsd2026-09-30 13:13:10 +02:00
erikinkinen referenced this issue from erix/vspaced2026-09-30 13:13:10 +02:00