*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> getgroups (2)              
Title
Content
Arch
Section
 

getgroups(2)

Contents


NAME    [Toc]    [Back]

       getgroups - Get the supplementary group IDs of the current
       process

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

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

       Application developers may want  to  specify  an  #include
       statement  for <sys/types.h> before the one for <unistd.h>
       if programs are being developed  for  multiple  platforms.
       The additional #include statement is not required on Tru64
       UNIX systems or by ISO or Open Group standards, but  might
       be  required  on  other  vendors'  systems that conform to
       these standards.

STANDARDS    [Toc]    [Back]

       Interfaces documented on this reference  page  conform  to
       industry standards as follows:

       getgroups(): XSH4.0, XSH4.2, XSH5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Indicates the number of entries that can be stored in  the
       array  pointed  to  by the grouplist parameter.  Points to
       the array in which the supplementary group IDs of the process
  are stored. The effective group ID of the process is
       not returned by the getgroups() function if it is not also
       a supplementary group ID of the calling process.

DESCRIPTION    [Toc]    [Back]

       The  getgroups()  function  gets the current supplementary
       group IDs of the calling process. The list  is  stored  in
       the  array pointed to by the grouplist parameter. The gidsetsize
 parameter indicates the number of entries that can
       be stored in this array.

       The  getgroups()  function never returns more IDs than the
       value    indicated    by    the    sysconf()     parameter
       _SC_NGROUPS_MAX.

       If  the  gidsetsize parameter is 0 (zero), the getgroups()
       function returns the number  of  supplementary  group  IDs
       associated  with the calling process without modifying the
       array pointed to by grouplist.

RETURN VALUES    [Toc]    [Back]

       Upon  successful  completion,  the  getgroups()   function
       returns the number of elements stored in the array pointed
       to by the grouplist  parameter.  Otherwise,  the  function
       returns  a  value  of  -1  and  sets errno to indicate the
       error.




ERRORS    [Toc]    [Back]

       If the getgroups() function fails, errno might be  set  to
       one  of the following values: [Tru64 UNIX]  The gidsetsize
       and grouplist parameters specify an  array  that  is  partially
  or  completely  outside  of  the allocated address
       space of the process.  The gidsetsize parameter is nonzero
       and smaller than the number of supplementary group IDs.

SEE ALSO    [Toc]    [Back]

      
      
       Commands: groups(1)

       Functions: getgid(2), setgroups(2), setsid(2), sysconf(2),
       initgroups(3)

       Standards: standards(5)



                                                     getgroups(2)
[ Back ]
 Similar pages
Name OS Title
pxfgetgroups IRIX Gets supplementary group IDs
getgroups Linux get/set list of supplementary group IDs
initgroups NetBSD initialize supplementary group IDs
initgroups OpenBSD initialize supplementary group IDs
getgroups IRIX get supplementary group access list IDs
initgroups Linux initialize the supplementary group access list
nsg_attach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
nsg_detach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
setaudproc HP-UX controls process level auditing for the current process and its decendents
pgfind OpenBSD find process / process group by number
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service