Commit | Line | Data |
---|---|---|
931b8415 CL |
1 | .\" Copyright (c) 1983, 1991 Regents of the University of California. |
2 | .\" All rights reserved. | |
caefb263 | 3 | .\" |
931b8415 | 4 | .\" %sccs.include.redist.man% |
caefb263 | 5 | .\" |
931b8415 CL |
6 | .\" @(#)getgid.2 6.3 (Berkeley) %G% |
7 | .\" | |
8 | .Dd | |
9 | .Dt GETGID 2 | |
10 | .Os BSD 4.2 | |
11 | .Sh NAME | |
12 | .Nm getgid , | |
13 | .Nm getegid | |
14 | .Nd get group process identification | |
15 | .Sh SYNOPSIS | |
16 | .Fd #include <sys/types.h> | |
17 | .Ft gid_t | |
18 | .Fn getgid void | |
19 | .Ft gid_t | |
20 | .Fn getegid void | |
21 | .Sh DESCRIPTION | |
22 | The | |
23 | .Fn getgid | |
24 | function returns the real group ID of the calling process, | |
25 | .Fn getegid | |
26 | returns the effective group ID of the calling process. | |
27 | .Pp | |
caefb263 | 28 | The real group ID is specified at login time. |
931b8415 CL |
29 | .Pp |
30 | The real group ID is the group of the user who invoked the program. | |
31 | As the effective group ID gives the process additional permissions | |
32 | during the execution of | |
33 | .Dq Em set-group-ID | |
34 | mode processes, | |
35 | .Fn getgid | |
36 | is used to determine the real-user-id of the calling process. | |
37 | .Sh ERRORS | |
38 | The | |
39 | .Fn getgid | |
40 | and | |
41 | .Fn getegid | |
42 | functions are always successful, and no return value is reserved to | |
43 | indicate an error. | |
44 | .Sh SEE ALSO | |
45 | .Xr getuid 2 , | |
46 | .Xr setregid 2 , | |
47 | .Xr setgid 3 | |
48 | .Sh STANDARDS | |
49 | .Fn Getgid | |
50 | and | |
51 | .Fn getegid | |
52 | conform to IEEE Std 1003.1-1988 | |
53 | .Pq Dq Tn POSIX . |