GETGID(2)
NAME
getgid, getegid − get group identity
USAGE
gid = getgid() int gid;
egid = getegid() int egid;
DESCRIPTION
Getgid reports the real group ID of the current process; getegid reports the effective group ID.
The real group ID is set at log-in time. The effective group ID determines additional access permission during execution of a “set-group-ID” process. It is for such processes that getgid is most useful.
RETURN VALUE
Getgid reports the process’s real group ID. Getegid reports the process’s effective group ID.