Skip to main content

std/sys/process/unix/
mod.rs

1#[cfg_attr(
2    any(target_os = "espidf", target_os = "horizon", target_os = "nuttx", target_os = "l4re"),
3    allow(unused)
4)]
5mod common;
6
7cfg_select! {
8    target_os = "fuchsia" => {
9        mod fuchsia;
10        use fuchsia as imp;
11    }
12    target_os = "vxworks" => {
13        mod vxworks;
14        use vxworks as imp;
15    }
16    any(target_os = "espidf", target_os = "horizon", target_os = "vita", target_os = "nuttx", target_os = "l4re") => {
17        mod unsupported;
18        use unsupported as imp;
19        pub use unsupported::output;
20    }
21    _ => {
22        mod unix;
23        use unix as imp;
24    }
25}
26
27#[cfg(target_os = "linux")]
28mod pidfd;
29
30pub use imp::{ExitStatus, ExitStatusError, Process};
31#[cfg(target_os = "linux")]
32pub use pidfd::PidFd;
33
34pub use self::common::{
35    ChildPipe, Command, CommandArgs, ExitCode, Stdio, getpid, getppid, read_output,
36};
37pub use crate::ffi::OsString as EnvKey;