Add PidFd type and seal traits
Improve docs Split do_fork into two Make do_fork unsafe Add target attribute to create_pidfd field in Command Add method to get create_pidfd value
This commit is contained in:
parent
ef03de2e6a
commit
619fd96868
4 changed files with 289 additions and 120 deletions
|
|
@ -1,13 +1,13 @@
|
|||
// run-pass
|
||||
// linux-only - pidfds are a linux-specific concept
|
||||
// only-linux - pidfds are a linux-specific concept
|
||||
|
||||
#![feature(linux_pidfd)]
|
||||
use std::os::linux::process::{CommandExt, ChildExt};
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
// We don't assert the precise value, since the standard libarary
|
||||
// may be opened other file descriptors before our code ran.
|
||||
// We don't assert the precise value, since the standard library
|
||||
// might have opened other file descriptors before our code runs.
|
||||
let _ = Command::new("echo")
|
||||
.create_pidfd(true)
|
||||
.spawn()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue