Skip to content

Commit

Permalink
Expand documentation for process_group
Browse files Browse the repository at this point in the history
Explain PGID 0, and provide the acronym PGID.
  • Loading branch information
joshtriplett authored Jul 16, 2022
1 parent b028bbf commit 629b0b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/std/src/os/unix/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub trait CommandExt: Sealed {
where
S: AsRef<OsStr>;

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

0 comments on commit 629b0b4

Please sign in to comment.