Expand documentation for process_group

Explain PGID 0, and provide the acronym PGID.
This commit is contained in:
Josh Triplett 2022-07-16 14:45:16 -07:00 committed by GitHub
parent b028bbf9d0
commit 629b0b488b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.
@ -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;