pid_t getpgrp(int pid);
pid_t getpgrp(void);
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. Each process group is the member of one session.
This call is thus used by programs such as csh(1) to create process groups in implementing job control. To get/set the process group of the controlling terminal, BSD applications use the TIOCGPGRP and TIOCSPGRP calls described in tty.4 and POSIX applications use the tcgetpgrp.2p and tcsetpgrp.2p functions.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97