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(
17        target_os = "espidf",
18        target_os = "horizon",
19        target_os = "vita",
20        target_os = "nuttx",
21        target_os = "l4re"
22    ) => {
23        mod unsupported;
24        use unsupported as imp;
25        pub use unsupported::output;
26    }
27    _ => {
28        mod unix;
29        use unix as imp;
30    }
31}
32
33#[cfg(target_os = "linux")]
34mod pidfd;
35
36pub use imp::{ExitStatus, ExitStatusError, Process};
37#[cfg(target_os = "linux")]
38pub use pidfd::PidFd;
39
40pub use self::common::{
41    ChildPipe, Command, CommandArgs, ExitCode, Stdio, getpid, getppid, read_output,
42};
43pub use crate::ffi::OsString as EnvKey;