Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setgroups(2)

initgroups(3C)

GETGROUPS(2)  —  HP-UX

Series 300, 800 Only

NAME

getgroups − get group access list

SYNOPSIS

#include <sys/param.h>

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

DESCRIPTION

Getgroups gets the current group access list of the user process and stores it in the array gidset. The parameter ngroups indicates the number of entries which may be placed in gidset.  No more than NGROUPS, as defined in <sys/param.h>, will ever be returned.

EXAMPLES

The following call to getgroups(2) retrieves the group access list of the calling process and stores the group ids in array mygidset:

int ngroups = NGROUPS;
int mygidset[NGROUPS];
int ngrps;

ngrps = getgroups (ngroups, mygidset);

RETURN VALUE

A nonnegative value indicates that the call succeeded, and is the number of elements returned in gidset.  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] Gidset specifies an invalid address.  The reliable detection of this error will be implementation dependent. 

­[EINVAL] Ngroups is less than the number of groups in the current group access list of the process. 

DEPENDENCIES

Series 500:
Getgroups not available. 

AUTHOR

Getgroups was developed by the University of California, Berkeley California, Computer Science Division, Department of Electrical Engineering and Computer Science. 

SEE ALSO

setgroups(2), initgroups(3C)

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

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