NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | ATTRIBUTES | SEE ALSO
#include <unistd.h>pid_t getpgrp(void);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
The process group of the current process is returned by getpgrp() . The process group of the process identified by pid is returned by getpgid() . If pid is zero, getpgid() 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 to read.
This call is thus used by programs such as RSH(5FEA) to create process groups in implementing job control. The tcgetpgrp() and tcsetpgrp() calls are used to get/set the process group of the control terminal.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | ATTRIBUTES | SEE ALSO