Repository navigation
libobs: Create Linux process pipes atomically close-on-exec - #493
ProtonDev-sys wants to merge 3 commits into
Conversation
2c144b8 to
4526fd3
Compare
|
Maintainer rebase onto master, replacing head
RED → GREEN (
|
|
CI triage: the only failure is "Rust Tier 2 macos-26", and it is a runner/SDK problem, not your change: the Xcode link of libobs fails with |
|
The red |
|
Status for @ProtonDev-sys, from a read of the diff and the checks. Review. The change looks correct. On Linux both pipes are made with Why it is BLOCKED. One check fails: Next steps
|
Exec a child after each real pipe syscall, before OBS can set CLOEXEC. Both read and write cases fail: four probes inherit eight pipe ends. Also check stdin delivery, stdout/stderr capture and exit status. Refs obs-rust#266. AI assistance: gpt-6-astra-pro.
Use pipe2(O_CLOEXEC) for both process pipes on Linux. Keep the existing non-Linux path and error cleanup unchanged. Both regression cases pass, including 100 repeats and ASan/UBSan/LSan. Removing O_CLOEXEC makes both cases fail again. Full OBS gates were not available in the isolated validation environment. Refs obs-rust#266. AI assistance: gpt-6-astra-pro.
|
Rebased onto master (004ae90) so CI picks up #808, the macOS SDK link fix that made Rust Tier 2 macos-26 fail here. Same three commits (RED, GREEN, clang-format), and the rebase had no conflicts. |
4526fd3 to
004ae90
Compare
|
#266 is closed: the shipped (hybrid) libobs now uses the Rust pipe port, whose std::process pipes are atomic close-on-exec, and |
|
Closing as stalled: no reply in 3 days to the note above. The shipped hybrid libobs already creates pipes close-on-exec through the Rust port (#266), and pipe-posix.c.h only builds into the C reference. Reopen if you want the C reference changed too. |
Refs #266
What and why
Create both Linux process pipes with
pipe2(O_CLOEXEC)so another thread cannot exec a child between pipe creation and a laterfcntlcall. Keep the existing pipe/fcntl path on other platforms and preserve error cleanup.Add a deterministic regression around the real
pipe-posix.c: execute a child immediately after each pipe syscall and check whether it inherits either pipe end. Also check stdin delivery, stdout/stderr capture, and exit status.RED → GREEN
137f0059b7241a66f60668827315a23b6a3d847c. The branch author reports both read/write cases fail, with eight inherited pipe ends across four exec probes.2c144b88f97f60b19913c4d470d4a1a8e3042133. The branch author reports both cases pass, including 100 repeats and ASan/UBSan/LSan; removingO_CLOEXECmakes both fail again.Remaining validation
Draft: the branch author states full OBS gates were unavailable. The required local gate/attestation is not present in the pushed commit. The concurrent-spawn parity test requested in the issue also remains unverified. This change covers Linux only; other platforms retain their existing behavior.
Checklist
masterAI assistance: branch commits credit
gpt-6-astra-pro; Codex inspected and submitted the existing branch on the account owner's request.