Commit | Line | Data |
---|---|---|
8bb980a3 C |
1 | TCGETPGRP(3) BSD Programmer's Manual TCGETPGRP(3) |
2 | ||
3 | N\bNA\bAM\bME\bE | |
4 | t\btc\bcg\bge\bet\btp\bpg\bgr\brp\bp - get foreground process group ID | |
5 | ||
6 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS | |
7 | #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/t\bty\byp\bpe\bes\bs.\b.h\bh>\b> | |
8 | #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<u\bun\bni\bis\bst\btd\bd.\b.h\bh>\b> | |
9 | ||
10 | _\bp_\bi_\bd_\b__\bt | |
11 | t\btc\bcg\bge\bet\btp\bpg\bgr\brp\bp(_\bi_\bn_\bt _\bf_\bd); | |
12 | ||
13 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN | |
14 | The t\btc\bcg\bge\bet\btp\bpg\bgr\brp\bp function returns the value of the process group ID of the | |
15 | foreground process group associated with the terminal device. If there | |
16 | is no foreground process group, t\btc\bcg\bge\bet\btp\bpg\bgr\brp\bp returns an invalid process ID. | |
17 | ||
18 | E\bER\bRR\bRO\bOR\bRS\bS | |
19 | If an error occurs, t\btc\bcg\bge\bet\btp\bpg\bgr\brp\bp returns -1 and the global variable _\be_\br_\br_\bn_\bo is | |
20 | set to indicate the error, as follows: | |
21 | ||
22 | [EBADF] The _\bf_\bd argument is not a valid file descriptor. | |
23 | ||
24 | [ENOTTY] The calling process does not have a controlling terminal or | |
25 | the underlying terminal device represented by _\bf_\bd is not the | |
26 | controlling terminal. | |
27 | ||
28 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO | |
29 | setpgid(3), setsid(2), tcsetpgrp(3) | |
30 | ||
31 | S\bST\bTA\bAN\bND\bDA\bAR\bRD\bDS\bS | |
32 | The t\btc\bcg\bge\bet\btp\bpg\bgr\brp\bp function is expected to be compliant with the IEEE | |
33 | Std1003.1-1988 (``POSIX'') specification. | |
34 | ||
35 | 4.4BSD June 4, 1993 1 |