Commit | Line | Data |
---|---|---|
5a58c649 MT |
1 | .\" Copyright (c) 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" %sccs.include.redist.roff% | |
5 | .\" | |
0ae9fc64 | 6 | .\" @(#)tcgetpgrp.3 5.1 (Berkeley) %G% |
5a58c649 | 7 | .\" |
0ae9fc64 MT |
8 | .Dd Jun 11, 1991 |
9 | .Dt TCGETPGRP | |
10 | .Os | |
11 | .Sh NAME | |
12 | .Nm tcgetpgrp | |
5a58c649 MT |
13 | .LP |
14 | .B "Get Foreground Process Group ID" | |
15 | .LP | |
16 | .B "Function: tcgetpgrp()" | |
17 | .LP | |
18 | .B "Synopsis" | |
19 | .LP | |
20 | .nf | |
21 | #include <sys/types.h> | |
22 | ||
23 | pid_t tcgetpgrp(int fildes); | |
24 | .fi | |
25 | .LP | |
26 | .B "Description" | |
27 | .LP | |
28 | The tcgetpgrp() function shall return the value of the process | |
29 | group ID of the foreground process group associated with the | |
30 | terminal. | |
31 | .LP | |
32 | .B "Returns" | |
33 | .LP | |
34 | Upon successful completion, tcgetpgrp() returns the process group ID of | |
35 | the foreground process group associated with the terminal. If there is | |
36 | no foreground process group, tcgetpgrp() shall return a value greater | |
37 | than 1 that does not match the process group ID of any existing process | |
38 | group. Otherwise, a value of -1 is returned and errno is set to indicate | |
39 | the error. | |
40 | .LP | |
41 | .B "Errors" | |
42 | .LP | |
43 | If any of the following conditions occur, the tcgetpgrp() function shall | |
44 | return -1 and set errno to the corresponding value: | |
45 | .nf | |
46 | [EBADF] The fildes argument is not a valid file descriptor. | |
47 | ||
48 | [ENOSYS] The tcgetpgrp() function is not supported in this | |
49 | implementation. | |
50 | ||
51 | [ENOTTY] The calling process does not have a controlling terminal | |
52 | or the file is not the controlling terminal. | |
53 | .fi |