getgroups man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



getgroups(2)							  getgroups(2)

NAME
     getgroups - get supplementary group access list IDs

SYNOPSIS
     #include <unistd.h>

     int ngrps;

   POSIX:
     ngrps = getgroups(int setlen, gid_t *gidset);

   BSD:
     ngrps = getgroups(int setlen, int *gidset);

     To use the BSD version of getgroups one must either

     1) explicitly invoke it as BSDgetgroups or

     2) link with the libbsd.a library:

	  cc -o prog prog.c -lbsd


DESCRIPTION
     getgroups retrieves the current group access list of the user process and
     stores it in the array gidset.  The parameter setlen indicates the number
     of entries that may be placed in gidset.  The return value is the actual
     number of groups placed in gidset, and this will never be greater than
     NGROUPS_UMAX for the POSIX version, and NGROUPS for the BSD version, as
     defined in <sys/param.h>.

     As a special case, if the setlen parameter is zero, getgroups returns the
     number of supplemental group IDs associated with the calling process
     without modifying the array pointed to by the gidset argument.

RETURN VALUE
     A successful call returns the number of groups in the group set.  A value
     of -1 indicates that an error occurred, and the error code is stored in
     the global variable errno.

ERRORS
     The possible errors for getgroups are:

     [EINVAL]	    The argument setlen is smaller than the number of groups
		    in the group set.

     [EFAULT]	    The argument gidset specifies an invalid address.

SEE ALSO
     multgrps(1), setgroups(2), initgroups(3)

									Page 1

getgroups(2)							  getgroups(2)

CAVEATS
     The POSIX and 4.3BSD versions differ in the types of their gidset
     parameter.

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net