getgroups() - retrieve supplementary group ID list
#include <sys/types.h>
#include <unistd.h>
int getgroups (int gidsetsize, gid_t grouplist[])
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.
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.
The getgroups(2) function fails because:
getgrnam(2)
getpwnam(2)
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.