Thanks to visit codestin.com Credit goes to github.com
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 3e4e31b commit ec0c755Copy full SHA for ec0c755
library/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