We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 954a272 commit cbf803cCopy full SHA for cbf803c
library/std/src/sys/pal/unix/linux/pidfd/tests.rs
@@ -45,8 +45,9 @@ fn test_command_pidfd() {
45
.expect_err("pidfd should not have been created");
46
47
// exercise the fork/exec path since the earlier attempts may have used pidfd_spawnp()
48
+ let mut cmd = Command::new("false");
49
let mut child =
- unsafe { Command::new("false").pre_exec(|| Ok(())) }.create_pidfd(true).spawn().unwrap();
50
+ unsafe { cmd.pre_exec(|| Ok(())) }.create_pidfd(true).spawn().unwrap();
51
52
assert!(child.id() > 0 && child.id() < -1i32 as u32);
53
0 commit comments