Commit | Line | Data |
---|---|---|
caefb263 KM |
1 | .\" Copyright (c) 1983 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
6b00fd0f | 5 | .\" @(#)getgid.2 6.1 (Berkeley) %G% |
caefb263 | 6 | .\" |
6b00fd0f | 7 | .TH GETGID 2 "" |
caefb263 KM |
8 | .UC 5 |
9 | .SH NAME | |
10 | getgid, getegid \- get group identity | |
11 | .SH SYNOPSIS | |
12 | .nf | |
13 | .ft B | |
14 | gid = getgid() | |
15 | int gid; | |
16 | .PP | |
17 | .ft B | |
18 | egid = getegid() | |
19 | int egid; | |
20 | .fi | |
21 | .SH DESCRIPTION | |
22 | .I Getgid | |
23 | returns the real group ID of the current process, | |
24 | .I getegid | |
25 | the effective group ID. | |
26 | .PP | |
27 | The real group ID is specified at login time. | |
28 | .PP | |
29 | The effective group ID is more transient, and determines | |
30 | additional access permission during execution of a | |
31 | ``set-group-ID'' process, and it is for such processes | |
32 | that \fIgetgid\fP is most useful. | |
33 | .SH "SEE ALSO" | |
34 | getuid(2), setregid(2), setgid(3) |