diff options
| author | joboet <jonasboettiger@icloud.com> | 2025-02-12 16:26:34 +0100 |
|---|---|---|
| committer | joboet <jonasboettiger@icloud.com> | 2025-03-22 12:42:34 +0100 |
| commit | 89f85cbfa7e508e55f2f05c00356b6d430c55c4e (patch) | |
| tree | 5bc245e760b7f82273237ae0c5285fc1d09db1a6 /library/std/src/sys/process/mod.rs | |
| parent | db687889a5833381b8b02738a1af93a09a97ba16 (diff) | |
| download | rust-89f85cbfa7e508e55f2f05c00356b6d430c55c4e.tar.gz rust-89f85cbfa7e508e55f2f05c00356b6d430c55c4e.zip | |
std: move process implementations to `sys`
As per #117276, this moves the implementations of `Process` and friends out of the `pal` module and into the `sys` module, removing quite a lot of error-prone `#[path]` imports in the process (hah, get it ;-)). I've also made the `zircon` module a dedicated submodule of `pal::unix`, hopefully we can move some other definitions there as well (they are currently quite a lot of duplications in `sys`). Also, the `ensure_no_nuls` function on Windows now lives in `sys::pal::windows` – it's not specific to processes and shared by the argument implementation.
Diffstat (limited to 'library/std/src/sys/process/mod.rs')
| -rw-r--r-- | library/std/src/sys/process/mod.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/library/std/src/sys/process/mod.rs b/library/std/src/sys/process/mod.rs new file mode 100644 index 00000000000..92cfac7f47c --- /dev/null +++ b/library/std/src/sys/process/mod.rs @@ -0,0 +1,19 @@ +cfg_if::cfg_if! { + if #[cfg(target_family = "unix")] { + mod unix; + use unix as imp; + } else if #[cfg(target_os = "windows")] { + mod windows; + use windows as imp; + } else if #[cfg(target_os = "uefi")] { + mod uefi; + use uefi as imp; + } else { + mod unsupported; + use unsupported as imp; + } +} + +pub use imp::{ + Command, CommandArgs, EnvKey, ExitCode, ExitStatus, ExitStatusError, Process, Stdio, StdioPipes, +}; |
