about summary refs log tree commit diff
path: root/library/std/src/process.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-09-21 22:20:27 +0200
committerGitHub <noreply@github.com>2025-09-21 22:20:27 +0200
commitadfc111fff3598dd24a94da518501ca127c1afd0 (patch)
treeb3e4579913cdffec38689506b82f04faa3b717af /library/std/src/process.rs
parentaf315d3027ec0a77eedc18b9a82bc43829fe1200 (diff)
parent87a00f67ba4c8148e6aa2e1768025b9d51a0fa8b (diff)
downloadrust-adfc111fff3598dd24a94da518501ca127c1afd0.tar.gz
rust-adfc111fff3598dd24a94da518501ca127c1afd0.zip
Rollup merge of #146639 - joboet:shared-stdiopipes, r=Mark-Simulacrum
std: merge definitions of `StdioPipes`

All platforms define this structure the same way, so we can just put it in the `process` module directly.
Diffstat (limited to 'library/std/src/process.rs')
-rw-r--r--library/std/src/process.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/library/std/src/process.rs b/library/std/src/process.rs
index 0883e56342c..5c0ac526a36 100644
--- a/library/std/src/process.rs
+++ b/library/std/src/process.rs
@@ -268,8 +268,8 @@ impl AsInner<imp::Process> for Child {
     }
 }
 
-impl FromInner<(imp::Process, imp::StdioPipes)> for Child {
-    fn from_inner((handle, io): (imp::Process, imp::StdioPipes)) -> Child {
+impl FromInner<(imp::Process, StdioPipes)> for Child {
+    fn from_inner((handle, io): (imp::Process, StdioPipes)) -> Child {
         Child {
             handle,
             stdin: io.stdin.map(ChildStdin::from_inner),
@@ -296,6 +296,15 @@ impl fmt::Debug for Child {
     }
 }
 
+/// The pipes connected to a spawned process.
+///
+/// Used to pass pipe handles between this module and [`imp`].
+pub(crate) struct StdioPipes {
+    pub stdin: Option<AnonPipe>,
+    pub stdout: Option<AnonPipe>,
+    pub stderr: Option<AnonPipe>,
+}
+
 /// A handle to a child process's standard input (stdin).
 ///
 /// This struct is used in the [`stdin`] field on [`Child`].