setgroups(2)
DESCRIPTION
Replaces the supplementary group list with count IDs copied from groups.
SYNOPSIS
long setgroups(int32_t count, const uint32_t *groups);
RETURN VALUE
- Returns zero, or a negative errno.
ERRORS
-EINVAL- Count is negative or greater than 16.
-EFAULT- Groups is not readable for count IDs.
-EPERM- The current effective GID is nonzero.
-ESRCH- There is no current process.
NOTES
A zero count is valid and does not dereference groups.