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 <[email protected]>
  • Loading branch information
cuviper and joshtriplett authored Oct 15, 2021
1 parent ad6e5e1 commit 74ef530
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 = self.get_create_pidfd();

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

0 comments on commit 74ef530

Please sign in to comment.