GETGROUPS(2) — SYSTEM CALLS
NAME
getgroups − get group access list
SYNOPSIS
#include <sys/param.h>
getgroups(n, gidset)
int n, ∗gidset;
DESCRIPTION
Getgroups gets the current group access list of the user process and stores it in the array gidset. The parameter n indicates the number of entries which may be placed in gidset and getgroups returns the actual number of entries placed in the gidset array. No more than NGROUPS, as defined in <sys/param.h>, will ever be returned.
RETURN VALUE
A return value of greater than zero indicates the number of entries placed in the gidset array. A return value of −1 indicates that an error occurred, and the error code is stored in the global variable errno.
ERRORS
The possible errors for getgroup are:
[EINVAL] The argument n is smaller than the number of groups you are in.
[EFAULT] The arguments n or gidset specify invalid addresses.
SEE ALSO
Sun Release 3.0β — Last change: 25 October 1984