GETGROUPS(2) — SYSTEM CALLS
NAME
getgroups − get group access list
SYNOPSIS
#include <sys/param.h>
ngroups = getgroups(n, &gidset)
int ngroups;
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 NGRPS, 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:
[EFAULT] The arguments ngroups or gidset specify invalid addresses.
SEE ALSO
Sun Release 1.1 — Last change: 13 March 1984