getgroups()

NAME

getgroups() - retrieve supplementary group ID list

SYNOPSIS

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

int getgroups (int gidsetsize, gid_t grouplist[])

DESCRIPTION

The getgroups(2) function reads through the group database and fills the grouplist array with the supplementary group IDs of the calling process.

The argument gidsetsize specifies the number of elements in the supplied array.

To determine the number of supplemental group IDs associated with the calling process, set gidsetsize to 0.

On Windows, groups and users share the same name space in the user accounts database.

RETURN VALUES

The getgroups(2) function returns the number of supplementary group IDs filled in the grouplist array.

On error, it returns -1. The group array will be filled with as many groups as will fit.

ERRORS

The getgroups(2) function fails because:

[EINVAL]
The gidsetsize argument isn't equal to 0 and is less than the number of supplementary group IDs.

SEE ALSO

getgrnam(2)

getpwnam(2)

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.