Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getgroups(2) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setgroups(2)

initgroups(3C)

getgroups(2)

NAME

getgroups − get group access list

SYNOPSIS

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

int getgroups (gsize, gidset)
int gsize;
gid_t ∗gidset;

DESCRIPTION

getgroups gets the current group access list of the user process and stores it in the array gidset. The parameter gsize indicates the number of entries which may be placed in gidset .  The return value is the number of entries in gidset that were filled.  No more than NGROUPS, as defined in <sys/param.h>, will ever be returned.  If gsize is zero, the return value is the number of supplemental group IDs associated with the calling process.  gidset is not modified. 

RETURN VALUE

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:

[EFAULT] The argument gidset is an invalid addresses. 

[EINVAL] The size of gidset as specified by gsize is too small to accommodate the entire group access list. 

SEE ALSO

setgroups(2), initgroups(3C)

CX/UX Programmer’s Reference Manual

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