Skip to content

Commit

Permalink
Also note tool expectations of fork vs clone3
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
  • Loading branch information
cuviper and joshtriplett committed Nov 5, 2021
1 parent fa2eee7 commit 6edaaa6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/std/src/sys/unix/process/process_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ impl Command {

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

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

0 comments on commit 6edaaa6

Please sign in to comment.