craig@Bbn-Unix.ARPA (04/12/84)
From: Craig Partridge <craig@Bbn-Unix.ARPA> (My mailer tells me this letter died en-route, so I'll try again.) The manual page for getgroups() on 4.2 is very wrong (both Sun and Berkeley manuals). A correct version is below. Corrections include: argument types, return value, constant name and additional error codes. ____________________________________________________________________ .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 ngrps = getgroups(gsize, gidset) int ngrps, gsize, *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 gsize indicates the number of entries which may be placed in .I gidset . The return value is the number of entries in .I gidset that were filled. No more than NGROUPS, as defined in .RI < sys/param.h >, will ever be returned. .SH "RETURN VALUE 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 \fIgetgroups\fP are: .TP 15 [EFAULT] The argument \fIgidset\fP is an invalid address. .TP 15 [EINVAL] The size of \fIgidset\fP as specified by \fIgsize\fP is too small to accomodate the entire group access list. .SH "SEE ALSO setgroups(2), initgroups(3)