File tree 2 files changed +2
-4
lines changed
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -149,8 +149,7 @@ pub trait CommandExt: Sealed {
149
149
/// The pidfd can be retrieved from the child with [`pidfd`] or [`take_pidfd`].
150
150
///
151
151
/// A pidfd will only be created if it is possible to do so
152
- /// in a guaranteed race-free manner (e.g. if the `clone3` system call
153
- /// is supported). Otherwise, [`pidfd`] will return an error.
152
+ /// in a guaranteed race-free manner. Otherwise, [`pidfd`] will return an error.
154
153
///
155
154
/// If a pidfd has been successfully created and not been taken from the `Child`
156
155
/// then calls to `kill()`, `wait()` and `try_wait()` will use the pidfd
Original file line number Diff line number Diff line change @@ -147,8 +147,7 @@ impl Command {
147
147
#[ cfg( not( target_os = "linux" ) ) ]
148
148
let pidfd = -1 ;
149
149
150
- // Safety: We obtained the pidfd from calling `clone3` with
151
- // `CLONE_PIDFD` so it's valid an otherwise unowned.
150
+ // Safety: We obtained the pidfd (on Linux) using SOCK_SEQPACKET, so it's valid.
152
151
let mut p = unsafe { Process :: new ( pid, pidfd) } ;
153
152
let mut bytes = [ 0 ; 8 ] ;
154
153
You can’t perform that action at this time.
0 commit comments