Skip to content

Commit 5ce9e2c

Browse files
committed
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.
1 parent 021fb9c commit 5ce9e2c

File tree

32 files changed

+90
-104
lines changed

32 files changed

+90
-104
lines changed

library/std/src/sys/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub mod io;
1616
pub mod net;
1717
pub mod os_str;
1818
pub mod path;
19+
pub mod process;
1920
pub mod random;
2021
pub mod sync;
2122
pub mod thread_local;

library/std/src/sys/pal/hermit/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ pub mod futex;
2626
pub mod os;
2727
#[path = "../unsupported/pipe.rs"]
2828
pub mod pipe;
29-
#[path = "../unsupported/process.rs"]
30-
pub mod process;
3129
pub mod stdio;
3230
pub mod thread;
3331
pub mod time;

library/std/src/sys/pal/sgx/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ mod libunwind_integration;
1818
pub mod os;
1919
#[path = "../unsupported/pipe.rs"]
2020
pub mod pipe;
21-
#[path = "../unsupported/process.rs"]
22-
pub mod process;
2321
pub mod stdio;
2422
pub mod thread;
2523
pub mod thread_parking;

library/std/src/sys/pal/solid/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ pub mod fs;
2626
pub mod os;
2727
#[path = "../unsupported/pipe.rs"]
2828
pub mod pipe;
29-
#[path = "../unsupported/process.rs"]
30-
pub mod process;
3129
pub mod stdio;
3230
pub use self::itron::{thread, thread_parking};
3331
pub mod time;

library/std/src/sys/pal/teeos/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ pub mod fs;
1616
pub mod os;
1717
#[path = "../unsupported/pipe.rs"]
1818
pub mod pipe;
19-
#[path = "../unsupported/process.rs"]
20-
pub mod process;
2119
pub mod stdio;
2220
pub mod thread;
2321
#[allow(non_upper_case_globals)]

library/std/src/sys/pal/uefi/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ pub mod helpers;
2020
pub mod os;
2121
#[path = "../unsupported/pipe.rs"]
2222
pub mod pipe;
23-
pub mod process;
2423
pub mod stdio;
2524
pub mod thread;
2625
pub mod time;

library/std/src/sys/pal/unix/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ pub mod args;
1010
pub mod env;
1111
pub mod fd;
1212
pub mod fs;
13+
#[cfg(target_os = "fuchsia")]
14+
pub mod fuchsia;
1315
pub mod futex;
1416
#[cfg(any(target_os = "linux", target_os = "android"))]
1517
pub mod kernel_copy;
1618
#[cfg(target_os = "linux")]
1719
pub mod linux;
1820
pub mod os;
1921
pub mod pipe;
20-
pub mod process;
2122
pub mod stack_overflow;
2223
pub mod stdio;
2324
pub mod sync;
@@ -421,7 +422,7 @@ cfg_if::cfg_if! {
421422
}
422423

423424
#[cfg(any(target_os = "espidf", target_os = "horizon", target_os = "vita", target_os = "nuttx"))]
424-
mod unsupported {
425+
pub mod unsupported {
425426
use crate::io;
426427

427428
pub fn unsupported<T>() -> io::Result<T> {

library/std/src/sys/pal/unix/process/mod.rs

Lines changed: 0 additions & 27 deletions
This file was deleted.

library/std/src/sys/pal/unsupported/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ pub mod env;
55
pub mod fs;
66
pub mod os;
77
pub mod pipe;
8-
pub mod process;
98
pub mod stdio;
109
pub mod thread;
1110
pub mod time;

0 commit comments

Comments
 (0)