Skip to content

Commit aa8f0fd

Browse files
committed
Auto merge of rust-lang#136929 - joboet:move_process_pal, r=Mark-Simulacrum
std: move process implementations to `sys` As per rust-lang#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.
2 parents 97fc1f6 + 89f85cb commit aa8f0fd

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
@@ -17,6 +17,7 @@ pub mod io;
1717
pub mod net;
1818
pub mod os_str;
1919
pub mod path;
20+
pub mod process;
2021
pub mod random;
2122
pub mod stdio;
2223
pub mod sync;

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

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

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ mod libunwind_integration;
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 thread;
2220
pub mod thread_parking;
2321
pub mod time;

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ pub(crate) mod error;
2525
pub mod os;
2626
#[path = "../unsupported/pipe.rs"]
2727
pub mod pipe;
28-
#[path = "../unsupported/process.rs"]
29-
pub mod process;
3028
pub use self::itron::{thread, thread_parking};
3129
pub mod time;
3230

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ pub mod env;
1414
pub mod os;
1515
#[path = "../unsupported/pipe.rs"]
1616
pub mod pipe;
17-
#[path = "../unsupported/process.rs"]
18-
pub mod process;
1917
pub mod thread;
2018
#[allow(non_upper_case_globals)]
2119
#[path = "../unix/time.rs"]

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

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

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ pub mod weak;
99
pub mod args;
1010
pub mod env;
1111
pub mod fd;
12+
#[cfg(target_os = "fuchsia")]
13+
pub mod fuchsia;
1214
pub mod futex;
1315
#[cfg(any(target_os = "linux", target_os = "android"))]
1416
pub mod kernel_copy;
1517
#[cfg(target_os = "linux")]
1618
pub mod linux;
1719
pub mod os;
1820
pub mod pipe;
19-
pub mod process;
2021
pub mod stack_overflow;
2122
pub mod sync;
2223
pub mod thread;
@@ -419,7 +420,7 @@ cfg_if::cfg_if! {
419420
}
420421

421422
#[cfg(any(target_os = "espidf", target_os = "horizon", target_os = "vita", target_os = "nuttx"))]
422-
mod unsupported {
423+
pub mod unsupported {
423424
use crate::io;
424425

425426
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
@@ -4,7 +4,6 @@ pub mod args;
44
pub mod env;
55
pub mod os;
66
pub mod pipe;
7-
pub mod process;
87
pub mod thread;
98
pub mod time;
109

0 commit comments

Comments
 (0)