Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getgroups(2) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setgroups

initgroups

     getgroups

Purpose

     Gets the group access list.

Syntax

     #include <grp.h>

     int getgroups (ngroups, gidset)
     int ngroups, *gidset;

Description

     The getgroups  system call gets the  current group access
     list  of the  user process.   The list  is stored  in the
     array pointed  to by  the gidset parameter.   The ngroups
     parameter  indicates the  number of  entries that  can be
     stored in this array.   getgroups never returns more than
     NGROUPS entries.   (NGROUPS is a constant  defined in the
     grp.h header file.)

Return Value

     Upon  successful completion,  the  getgroups system  call
     returns  the number  of  elements stored  into the  array
     pointed to by the  gidset parameter.  If getgroups fails,
     then a value of -1 is  returned and errno is set to indi-
     cate the error.

Diagnostics

     The getgroups system call fails if the following is true:

     EFAULT     The ngroups  and gidset parameters  specify an
                array that is  partially or completely outside
                of the process's allocated address space.

Related Information

     In this book:  "setgroups" and "initgroups."

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