Manual Reference Pages - GETPGRP (2)
- get process group
getpgid pid_t pid
The process group of the current process is returned by
The process group of the process identified by
is returned by
returns the process group of the current process.
Process groups are used for distribution of signals, and
by terminals to arbitrate requests for their input: processes
that have the same process group as the terminal are foreground
and may read, while others will block with a signal if they attempt
This system call is thus used by programs such as
in implementing job control.
are used to get/set the process group of the control terminal.
system call always succeeds.
Upon successful completion, the
system call returns the process group of the specified process;
otherwise, it returns a value of -1 and sets
to indicate the error.
This version of
differs from past Berkeley versions by not taking a
This incompatibility is required by
system call that returns the process group ID for a specified process.
Although this function is used to support job control, all known
job-control shells always specify the calling process with this
Thus, the simpler
suffices, and the added complexity of the
has been omitted from POSIX.1.
The old functionality is available from the
will succeed unless:
there is no process whose process ID equals
system call is expected to conform to
system call appeared in
BSD 4.0 .
system call is derived from its usage in
AT&T V.4 .
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.