add pidfd_open(2) and pidfd_send_signal(2)#2748
Conversation
3c6a7e6 to
757d1b4
Compare
|
CI / cross (arm-unknown-linux-gnueabi) (pull_request) and CI / cross (armv7-unknown-linux-gnueabihf) (pull_request) are failing because they don't have the syscalls, don't know what to do about that. CI / cross (powerpc64le-unknown-linux-gnu) (pull_request) seems to be stuck in the test for Footnotes
|
1e168f7 to
66100d0
Compare
|
Changing the test to eliminate any potential races actually made it worse, CI / cross (arm-unknown-linux-gnueabi) (pull_request) and CI / cross (armv7-unknown-linux-gnueabihf) (pull_request) became stuck in addition to the one mentioned before. I don't seem to be able to manually cancel the runners and there doesn't seem to be any timeout (the previous attempt ran for about five hours before I pushed again), so I'm just going to add a commit to disable the |
54275a2 to
70f234a
Compare
|
The common problem between all three checks that were getting stuck is that all of them returned |
70f234a to
795bc79
Compare
|
Hmm, pushed again and now CI / macos-aarch64 (pull_request) is passing, maybe it's just flaky? |
795bc79 to
8064dbe
Compare
…ll fallback Follow-up to dropped todo #60. The pre-existing section header at `sandbox-route-helper/src/main.rs:192` (`// pidfd_open — direct libc syscall (nix 0.29 does not expose it)`) explained that nix did not provide a wrapper but did not point at the upstream tracker, leaving a future reader to guess whether the gap was deliberate or whether nix had since shipped a wrapper that nobody had wired up. Add a single-line in-tree comment immediately above the `libc::syscall(SYS_pidfd_open, ...)` invocation referencing `nix-rust/nix#2748` so the libc fallback reads as a deliberate gap pending the upstream wrapper, not an oversight. The comment shape matches the requested template: `// nix-rust/nix#2748: pidfd_open wrapper not yet provided; using libc::syscall as a deliberate gap.` The pre-existing header at line 192 is left untouched — the new comment is additive. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Hi, the CI failures should go away if you rebase your branch. |
8064dbe to
736f0cc
Compare
736f0cc to
9f6a0be
Compare
What does this PR do
It adds
pidfd_open(2)andpidfd_send_signal(2). I personally don't have an immediate need forpidfd_getfd(2)so it's not included in this PR. It's particularly important to me that thepidfd_open(2)implementation is async-signal-safe, so that it can be used betweenforkandexecto achieve race-free PIDFD acquisition without violating any libc's invariants; see the conversation at rust-lang/rust#89522 (comment) for details on that topic.See #1868 for prior art; review comments there have been addressed here.
Checklist:
CONTRIBUTING.md