#include <qsysetid.h> int qsygetgroups(int gidsetsize, gid_t grouplist[])Service Program Name: QSYSETIDS
If the gidsetsize argument is zero, qsygetgroups() returns the number of supplemental group IDs associated with the calling thread without modifying the array pointed to by the grouplist argument. Otherwise, qsygetgroups() fills in the array grouplist with the supplementary group IDs of the calling thread and returns the actual number of group IDs stored. The values of array entries with indexes larger than or equal to the returned value are undefined.
No authorization is required.
0 or > 0 | qsygetgroups() was successful. If the gidsetsize argument is 0, the number of supplementary group IDs is returned. If gidsetsize is greater than 0, the array grouplist is filled with the supplementary group IDs of the calling thread and the return value represents the actual number of group IDs stored. |
-1 | qsygetgroups() was not successful. The errno global variable is set to indicate the error. |
If qsygetgroups() is not successful, errno usually indicates one of the following errors. Under some conditions, errno could indicate an error other than those listed here.
Error condition | Additional information |
---|---|
[EINVAL] | The gidsetsize argument is not equal to zero and is less than the number of group IDs. |
Top | UNIX-Type APIs | APIs by category |