Commit | Line | Data |
---|---|---|
2cf6fecc C |
1 | |
2 | ||
3 | ||
4 | GETPGRP(2) UNIX Programmer's Manual GETPGRP(2) | |
5 | ||
6 | ||
7 | ||
8 | N\bNA\bAM\bME\bE | |
9 | getpgrp - get process group | |
10 | ||
11 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS | |
12 | p\bpg\bgr\brp\bp =\b= g\bge\bet\btp\bpg\bgr\brp\bp(\b(p\bpi\bid\bd)\b) | |
13 | i\bin\bnt\bt p\bpg\bgr\brp\bp;\b; | |
14 | i\bin\bnt\bt p\bpi\bid\bd;\b; | |
15 | ||
16 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN | |
17 | The process group of the specified process is returned by | |
18 | _\bg_\be_\bt_\bp_\bg_\br_\bp. If _\bp_\bi_\bd is zero, then the call applies to the | |
19 | current process. | |
20 | ||
21 | Process groups are used for distribution of signals, and by | |
22 | terminals to arbitrate requests for their input: processes | |
23 | that have the same process group as the terminal are fore- | |
24 | ground and may read, while others will block with a signal | |
25 | if they attempt to read. | |
26 | ||
27 | This call is thus used by programs such as _\bc_\bs_\bh(1) to create | |
28 | process groups in implementing job control. The TIOCGPGRP | |
29 | and TIOCSPGRP calls described in _\bt_\bt_\by(4) are used to get/set | |
30 | the process group of the control terminal. | |
31 | ||
32 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO | |
33 | setpgrp(2), getuid(2), tty(4) | |
34 | ||
35 | ||
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
41 | ||
42 | ||
43 | ||
44 | ||
45 | ||
46 | ||
47 | ||
48 | ||
49 | ||
50 | ||
51 | ||
52 | ||
53 | ||
54 | ||
55 | ||
56 | ||
57 | ||
58 | ||
59 | ||
60 | ||
61 | ||
62 | ||
63 | Printed 7/9/88 August 26, 1985 1 | |
64 | ||
65 | ||
66 |