Skip to content

Commit 6edaaa6

Browse files
cuviperjoshtriplett
andcommitted
Also note tool expectations of fork vs clone3
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
1 parent fa2eee7 commit 6edaaa6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/std/src/sys/unix/process/process_unix.rs

+2
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ impl Command {
168168

169169
// Bypassing libc for `clone3` can make further libc calls unsafe,
170170
// so we use it sparingly for now. See #89522 for details.
171+
// Some tools (e.g. sandboxing tools) may also expect `fork`
172+
// rather than `clone3`.
171173
let want_clone3_pidfd = self.get_create_pidfd();
172174

173175
// If we fail to create a pidfd for any reason, this will

0 commit comments

Comments
 (0)