Rev | Author | # | Line |
---|---|---|---|
1 | perry | 1 | !!NAME |
2 | PerryLorier | 2 | getpgid - get process group |
1 | perry | 3 | !!SYNOPSIS |
4 | |||
5 | |||
2 | PerryLorier | 6 | __#include <unistd.h>__ |
1 | perry | 7 | |
8 | |||
2 | PerryLorier | 9 | pid_t getpgid(pid_t__ ''pid''__); |
1 | perry | 10 | !!DESCRIPTION |
2 | PerryLorier | 11 | getpgid(2) returns the process group ID of the process specified by ''pid''. If ''pid'' is zero, the process ID of the current process is used. |
1 | perry | 12 | |
2 | PerryLorier | 13 | 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. These calls are thus used by programs such as csh(1) to create process groups in implementing job control. The [TIOCGPGRP] and [TIOCSPGRP] calls described in termios(3) are used to get/set the process group of the control terminal. |
1 | perry | 14 | |
2 | PerryLorier | 15 | If a session has a controlling terminal, [CLOCAL] is not set and a hangup occurs, then the session leader is sent a [SIGHUP]. If the session leader exits, the [SIGHUP] signal will be sent to each process in the foreground process group of the controlling terminal. |
1 | perry | 16 | |
2 | PerryLorier | 17 | If the exit of the process causes a process group to become orphaned, and if any member of the newly-orphaned process group is stopped, then a [SIGHUP] signal followed by a [SIGCONT] signal will be sent to each process in the newly-orphaned process group. |
1 | perry | 18 | |
19 | !!RETURN VALUE | ||
2 | PerryLorier | 20 | __getpgid__ returns a process group on success. On error, -1 is returned, and ''errno'' is set appropriately. |
1 | perry | 21 | |
22 | !!ERRORS | ||
2 | PerryLorier | 23 | ;[EINVAL]: ''pgid'' is less than 0. |
24 | ;[EPERM]: Various permission violations. | ||
25 | ;[ESRCH]: ''pid'' does not match any process. | ||
1 | perry | 26 | |
27 | !!CONFORMING TO | ||
2 | PerryLorier | 28 | The function getpgid(2) conforms to SVr4. |
1 | perry | 29 | !!SEE ALSO |
2 | PerryLorier | 30 | getuid(2), setsid(2), tcsetpgrp(3), termios(4), [SIGHUP] |
lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 4 times)