Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setgroups(2)

getgid(2)

setgid(2)

initgroups(3)



  getgroups(2)                        CLIX                        getgroups(2)



  NAME

    getgroups - Gets the supplementary group set of the current process

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <sys/types.h>
    int getgroups(
      int gidsetsize ,
      gid_t grouplist[] );

  PARAMETERS

    grouplist   Points to the array in which the process's supplementary group
                IDs are stored.

    gidsetsize  Specifies the number of entries that can be stored in the
                array pointed to by the grouplist parameter.

  DESCRIPTION

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

    As a special case, if the gidsetsize parameter is 0, getgroups() returns
    the number of supplemental group IDs associated with the calling process
    without modifying the array pointed to be the grouplist parameter.

  RETURN VALUES

    Upon successful completion, getgroups() returns the number of
    supplementary groups.  If getgroups() fails, a value of -1 is returned and
    the global variable errno is set to indicate the error.

  ERRORS

    The getgroups() function fails if the following is true:

    [EINVAL]   The gidsetsize parameter is not equal to 0 and is less than the
               number of supplementary group IDs.

  RELATED INFORMATION

    Functions: setgroups(2), getgid(2), setgid(2), initgroups(3)




  2/94 - Intergraph Corporation                                              1




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026