4.2BSD/usr/man/man2/getgid.2

Compare this file to the similar file:
Show the results in this format:

.TH GETGID 2 "12 February 1983"
.UC 4
.SH NAME
getgid, getegid \- get group identity
.SH SYNOPSIS
.nf
.ft B
gid = getgid()
int gid;
.PP
.ft B
egid = getegid()
int egid;
.fi
.SH DESCRIPTION
.I Getgid
returns the real group ID of the current process,
.I getegid
the effective group ID.
.PP
The real group ID is specified at login time.
.PP
The effective group ID is more transient, and determines
additional access permission during execution of a
``set-group-ID'' process, and it is for such processes
that \fIgetgid\fP is most useful.
.SH "SEE ALSO"
getuid(2), setregid(2), setgid(3)