Description
proc_spawn_exec_raw remaps stdin, stdout and stderr sequentially. _proc_dup_child_fd closes each source fd immediately after dup2. Passing the same nonstandard fd for both stdout and stderr therefore closes it after the first mapping; the second dup2 uses a closed fd and the child exits with PROC_EXIT_DUP_FAIL. Mappings that swap standard descriptors can also overwrite a source before it is used.
Combining stdout/stderr onto one pipe is a normal subprocess use case.
Code evidence:
Acceptance:
- Plan remapping before closing descriptors, preserving sources required by later mappings and using temporary duplicates for cycles where needed.
- Cover shared stdout/stderr, a stdin/stdout swap, identity mappings and disabled (-1) mappings.
- Close each no-longer-needed descriptor exactly once and clean up temporary duplicates on failure.
- Keep parent-owned descriptors and native Unix process behavior intact; Add native Windows process spawning and waiting APIs #429 handles the separate Windows spawning implementation.
Audit status: static source inspection against canonical master ea74c2dafc31da876e5561f2d176ba719f5a0458 on 2026-09-10. No compiler build, test execution, implementation change or local reproduction was performed for this report. The examples describe the source-derived behavior to verify when implementing the fix.
Activity
LunaStev commentedon Sep 12, 2026
PR #606's Linux amd64 case precheck uncovered a remaining integration regression:
test13.wavestill imports the removed_proc_dup_child_fdhelper. This is now tracked by #607. A read-only audit of all 605 manifest sources found exactly this one check failure; the other 604 sources passed.Failing Linux job. The precheck stops before the native case runner, so its case report is absent. The independent workflow aggregation/reporting problem is tracked by #610. The existing case should be retained and its import reconciled with the revised helper surface.
fix: stabilize process streams, ARM64 LLVM ownership, and IOCP restart (