SETGRP(2X) — Unix Programmer’s Manual
NAME
setgrp − set/get group access
SYNOPSIS
setgrp(newgroups, oldgroups)
int ∗newgroups, ∗oldgroups;
DESCRIPTION
Setgrp sets the group access of the current user process according to the bit array pointed to by newgroups. Each bit in the array which is set allows access to the correspondingly numbered group; each bit which is clear denies access. The array has size NGRPS bits, defined in <sys/param.h>. The old value of the groups mask is returned in the bit array referenced by oldgroups. Either newgroups or oldgroups may be omitted by specifying 0.
Only the super-user may set new groups.
SEE ALSO
BUGS
Group ID numbers are allowed to range only from 0 through 255.
This call is provisional, and will exist in a slightly different form in 4.2bsd.
7th Edition — 3/17/82