getgroups man page on Ultrix

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

getgroups(2)							  getgroups(2)

       getgroups - get group access list

       #include <sys/types.h>
       #include <unistd.h>

       int getgroups(gidsetsize, grouplist)
       int gidsetsize;
       int grouplist[];

       The  call  gets	the  current group access list of the user process and
       stores it in the array of  int  grouplist.   The	 gidsetsize  parameter
       indicates the number of entries that can be placed in grouplist.

Return Values
       Upon success, the call returns the number of groups as the value of the
       function.  No more than	NGROUPS,  as  defined  in  <sys/param.h>,  are

       A  value	 of -1 indicates that an error occurred, and the error code is
       stored in the global variable, errno.

       The call fails under the following conditions:

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

       [EFAULT]	      The grouplist argument specifies invalid addresses.

       When  your  program is compiled in the POSIX environment, the grouplist
       argument should be defined as follows:

       gid_t	 grouplist[];

       Additionally, in the POSIX environment, if the gidsetsize  argument  is
       zero,  returns the number of supplemental group IDs associated with the
       calling process, without modifying the array pointed to	by  the	 grou‐
       plist argument.

See Also
       setgroups(2), initgroups(3x)


List of man pages available for Ultrix

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]
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