.TH GETGROUPS 2 "7 July 1983" .UC 4 .SH NAME getgroups \- get group access list .SH SYNOPSIS .nf .ft B #include <sys/param.h> .PP .ft B getgroups(ngroups, gidset) int *ngroups, *gidset; .fi .SH DESCRIPTION .I Getgroups gets the current group access list of the user process and stores it in the array .IR gidset . The parameter .I ngroups indicates the number of entries which may be placed in .I gidset and is modified on return to indicate the actual number of groups returned. No more than NGRPS, as defined in .RI < sys/param.h >, will ever be returned. .SH "RETURN VALUE A value of 0 indicates that the call succeeded, and that the number of elements of \fIgidset\fP and the set itself were returned. A value of \-1 indicates that an error occurred, and the error code is stored in the global variable \fIerrno\fP\|. .SH "ERRORS The possible errors for \fIgetgroup\fP are: .TP 15 [EFAULT] The arguments \fIngroups\fP or \fIgidset\fP specify invalid addresses. .SH "SEE ALSO setgroups(2), initgroups(3)