Skip to content

Commit 629b0b4

Browse files
authored
Expand documentation for process_group
Explain PGID 0, and provide the acronym PGID.
1 parent b028bbf commit 629b0b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

library/std/src/os/unix/process.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ pub trait CommandExt: Sealed {
148148
where
149149
S: AsRef<OsStr>;
150150

151-
/// Sets the process group ID of the child process. Equivalent to a
151+
/// Sets the process group ID (PGID) of the child process. Equivalent to a
152152
/// `setpgid` call in the child process, but may be more efficient.
153153
///
154154
/// Process groups determine which processes receive signals.
@@ -163,6 +163,8 @@ pub trait CommandExt: Sealed {
163163
/// The parent process could install a signal handler and manage the
164164
/// subprocess on its own terms.
165165
///
166+
/// A process group ID of 0 will use the process ID as the PGID.
167+
///
166168
/// ```no_run
167169
/// use std::process::Command;
168170
/// use std::os::unix::process::CommandExt;

0 commit comments

Comments
 (0)