about summary refs log tree commit diff
path: root/library/std/src/sys/process/unix
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-05-06 06:37:30 +0000
committerbors <bors@rust-lang.org>2025-05-06 06:37:30 +0000
commit651e9cf327358b28db7e37a2ae61727f4a2ef232 (patch)
tree9e08a2741b303e04c0f4b98a180efd01d8716f1d /library/std/src/sys/process/unix
parent7295b08a17d1107155acd4b552069e3705b0ab1f (diff)
parent546c1c2dd48ba6eded56a9ee74d78cab8e7ad204 (diff)
downloadrust-651e9cf327358b28db7e37a2ae61727f4a2ef232.tar.gz
rust-651e9cf327358b28db7e37a2ae61727f4a2ef232.zip
Auto merge of #140695 - Zalathar:rollup-i32gzbo, r=Zalathar
Rollup of 12 pull requests

Successful merges:

 - #139550 (Fix `-Zremap-path-scope` rmeta handling)
 - #139764 (Consistent trait bounds for ExtractIf Debug impls)
 - #139773 (Implement `Iterator::last` for `vec::IntoIter`)
 - #140035 (Implement RFC 3503: frontmatters)
 - #140251 (coverage-dump: Resolve global file IDs to filenames)
 - #140393 (std: get rid of `sys_common::process`)
 - #140532 (Fix RustAnalyzer discovery of rustc's `stable_mir` crate)
 - #140598 (Steer docs to `utf8_chunks` and `Iterator::take`)
 - #140634 (Use more accurate ELF flags on MIPS)
 - #140673 (Clean rustdoc tests folder)
 - #140678 (Be a bit more relaxed about not yet constrained infer vars in closure upvar analysis)
 - #140687 (Update mdbook to 0.4.49)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys/process/unix')
-rw-r--r--library/std/src/sys/process/unix/common.rs2
-rw-r--r--library/std/src/sys/process/unix/fuchsia.rs5
-rw-r--r--library/std/src/sys/process/unix/unix.rs5
-rw-r--r--library/std/src/sys/process/unix/unsupported.rs8
-rw-r--r--library/std/src/sys/process/unix/vxworks.rs5
5 files changed, 5 insertions, 20 deletions
diff --git a/library/std/src/sys/process/unix/common.rs b/library/std/src/sys/process/unix/common.rs
index 8bc17f31491..a9c2510e6d4 100644
--- a/library/std/src/sys/process/unix/common.rs
+++ b/library/std/src/sys/process/unix/common.rs
@@ -12,7 +12,7 @@ use crate::sys::fs::File;
 #[cfg(not(target_os = "fuchsia"))]
 use crate::sys::fs::OpenOptions;
 use crate::sys::pipe::{self, AnonPipe};
-use crate::sys_common::process::{CommandEnv, CommandEnvs};
+use crate::sys::process::env::{CommandEnv, CommandEnvs};
 use crate::sys_common::{FromInner, IntoInner};
 use crate::{fmt, io, ptr};
 
diff --git a/library/std/src/sys/process/unix/fuchsia.rs b/library/std/src/sys/process/unix/fuchsia.rs
index 0de32ecffd4..fbe06c4799b 100644
--- a/library/std/src/sys/process/unix/fuchsia.rs
+++ b/library/std/src/sys/process/unix/fuchsia.rs
@@ -31,11 +31,6 @@ impl Command {
         Ok((Process { handle: Handle::new(process_handle) }, ours))
     }
 
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        let (proc, pipes) = self.spawn(Stdio::MakePipe, false)?;
-        crate::sys_common::process::wait_with_output(proc, pipes)
-    }
-
     pub fn exec(&mut self, default: Stdio) -> io::Error {
         if self.saw_nul() {
             return io::const_error!(
diff --git a/library/std/src/sys/process/unix/unix.rs b/library/std/src/sys/process/unix/unix.rs
index ae1c9558281..1b3bd2de265 100644
--- a/library/std/src/sys/process/unix/unix.rs
+++ b/library/std/src/sys/process/unix/unix.rs
@@ -162,11 +162,6 @@ impl Command {
         }
     }
 
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        let (proc, pipes) = self.spawn(Stdio::MakePipe, false)?;
-        crate::sys_common::process::wait_with_output(proc, pipes)
-    }
-
     // WatchOS and TVOS headers mark the `fork`/`exec*` functions with
     // `__WATCHOS_PROHIBITED __TVOS_PROHIBITED`, and indicate that the
     // `posix_spawn*` functions should be used instead. It isn't entirely clear
diff --git a/library/std/src/sys/process/unix/unsupported.rs b/library/std/src/sys/process/unix/unsupported.rs
index 78d270923cf..e86561a5c5c 100644
--- a/library/std/src/sys/process/unix/unsupported.rs
+++ b/library/std/src/sys/process/unix/unsupported.rs
@@ -18,15 +18,15 @@ impl Command {
         unsupported()
     }
 
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        unsupported()
-    }
-
     pub fn exec(&mut self, _default: Stdio) -> io::Error {
         unsupported_err()
     }
 }
 
+pub fn output(_: &mut Command) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
+    unsupported()
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // Processes
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/library/std/src/sys/process/unix/vxworks.rs b/library/std/src/sys/process/unix/vxworks.rs
index b92446f0cf6..fab3b36ebf3 100644
--- a/library/std/src/sys/process/unix/vxworks.rs
+++ b/library/std/src/sys/process/unix/vxworks.rs
@@ -112,11 +112,6 @@ impl Command {
         }
     }
 
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        let (proc, pipes) = self.spawn(Stdio::MakePipe, false)?;
-        crate::sys_common::process::wait_with_output(proc, pipes)
-    }
-
     pub fn exec(&mut self, default: Stdio) -> io::Error {
         let ret = Command::spawn(self, default, false);
         match ret {