Copyright (c) 1983 Regents of the University of California.
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)getgroups.2 5.1 (Berkeley) 05/15/85
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)getgroups.2 5.1 (Berkeley) 05/15/85
GETGROUPS 2 "7 July 1983"
C 5 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 and is modified on return to indicate the actual number of
groups returned.
No more than NGRPS, as defined in
< sys/param.h >, will ever
be returned.
"RETURN VALUE
A value of 0 indicates that the call succeeded, and that the
number of elements of gidset and the set itself were returned.
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 getgroup are:
15 [EFAULT] The arguments ngroups or gidset specify invalid addresses.
"SEE ALSO
setgroups(2), initgroups(3)