about summary refs log tree commit diff
path: root/library/std/src/os/unix/process.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/os/unix/process.rs')
-rw-r--r--library/std/src/os/unix/process.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/library/std/src/os/unix/process.rs b/library/std/src/os/unix/process.rs
index 855f900430c..d95bc9b15c9 100644
--- a/library/std/src/os/unix/process.rs
+++ b/library/std/src/os/unix/process.rs
@@ -149,6 +149,11 @@ pub trait CommandExt: Sealed {
     fn arg0<S>(&mut self, arg: S) -> &mut process::Command
     where
         S: AsRef<OsStr>;
+
+    /// Sets the process group ID of the child process. Translates to a `setpgid` call in the child
+    /// process.
+    #[unstable(feature = "process_set_process_group", issue = "93857")]
+    fn process_group(&mut self, pgroup: i32) -> &mut process::Command;
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -201,6 +206,11 @@ impl CommandExt for process::Command {
         self.as_inner_mut().set_arg_0(arg.as_ref());
         self
     }
+
+    fn process_group(&mut self, pgroup: i32) -> &mut process::Command {
+        self.as_inner_mut().pgroup(pgroup);
+        self
+    }
 }
 
 /// Unix-specific extensions to [`process::ExitStatus`] and