We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c9a96e commit 17d03b9Copy full SHA for 17d03b9
std/src/sys/pal/unix/linux/pidfd/tests.rs
@@ -21,6 +21,7 @@ fn test_command_pidfd() {
21
let flags = super::cvt(unsafe { libc::fcntl(pidfd.as_raw_fd(), libc::F_GETFD) }).unwrap();
22
assert!(flags & libc::FD_CLOEXEC != 0);
23
}
24
+ assert!(child.id() > 0 && child.id() < -1i32 as u32);
25
let status = child.wait().expect("error waiting on pidfd");
26
assert_eq!(status.code(), Some(1));
27
@@ -47,6 +48,8 @@ fn test_command_pidfd() {
47
48
let mut child =
49
unsafe { Command::new("false").pre_exec(|| Ok(())) }.create_pidfd(true).spawn().unwrap();
50
51
52
+
53
if pidfd_open_available {
54
assert!(child.pidfd().is_ok())
55
0 commit comments