Main index | Section 2 | 日本語 | Deutsch | Options |
#include <unistd.h>
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 system call is thus used by programs such as csh(1) 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.
From the IEEE Std 1003.1-90 ("POSIX.1") Rationale:
BSD 4.3 provides a getpgrp() 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 function. Thus, the simpler AT&T V getpgrp() suffices, and the added complexity of the BSD 4.3 getpgrp() has been omitted from POSIX.1. The old functionality is available from the getpgid() system call.
[ESRCH] | |
there is no process whose process ID equals pid | |
GETPGRP (2) | June 4, 1993 |
Main index | Section 2 | 日本語 | Deutsch | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs. | ” |
— Maurice Wilkes |