fix copyright and condition notice for new sccs include
[unix-history] / usr / src / lib / libc / sys / getgid.2
CommitLineData
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.\"
dbf001ae 5.\" @(#)getgid.2 6.2 (Berkeley) %G%
caefb263 6.\"
6b00fd0f 7.TH GETGID 2 ""
caefb263
KM
8.UC 5
9.SH NAME
10getgid, getegid \- get group identity
11.SH SYNOPSIS
12.nf
13.ft B
dbf001ae
KM
14#include <sys/types.h>
15.PP
16.nf
17.ft B
caefb263 18gid = getgid()
dbf001ae 19gid_t gid;
caefb263
KM
20.PP
21.ft B
22egid = getegid()
dbf001ae 23gid_t egid;
caefb263
KM
24.fi
25.SH DESCRIPTION
26.I Getgid
27returns the real group ID of the current process,
28.I getegid
29the effective group ID.
30.PP
31The real group ID is specified at login time.
32.PP
33The effective group ID is more transient, and determines
34additional access permission during execution of a
35``set-group-ID'' process, and it is for such processes
36that \fIgetgid\fP is most useful.
37.SH "SEE ALSO"
38getuid(2), setregid(2), setgid(3)