Go to the previous, next section.
int setgid(gid_t gid);
gid: [in] the new gid.
If the calling task does not have superuser privileges, it may use
setgid
to sets its effective gid to its saved gid or its real gid
(other values are illegal). If the calling task has superuser
privileges, the real, effective and saved gids are set to gid.
On success, returns 0. On error, returns -1 and errno
is set
to one of the following values: EPERM
: the gid is not the
real gid or the saved gid of the task and the task does not have
superuser privileges.
Go to the previous, next section.