.TH getegid() "" "" "System Call (libc)"
.PC "Get effective group identifier"
.B "#include <unistd.h>"
.B getegid()
.PP
Every process has two different versions of its
.IR "group identifier" ,
called the
.I real
group identifier and the
.I effective
group identifier.
The group identifiers determine eligibility to access files and
use system privileges.
Normally, these two identifiers are identical.
However, for a
.I "set group identifier"
load module
(see
.BR exec ),
the real group identifier is that of the group's current group,
whereas the effective group identifier is that of the
load module owner.
This distinction allows
system programs to use files which are protected from
groups that invoke the program.
.PP
.B getegid()
returns the effective group identifier.
.SH "See Also"
.Xr "access," access
.Xr "exec," exec
.Xr "geteuid()," geteuid
.Xr "getgid()," getgid
.Xr "getuid()," getuid
.Xr "libc," libc
.Xr "login," login
.Xr "setuid()," setuid
.Xr "unistd.h" unistd.h
.br
\*(PX Standard, \(sc4.2.1
