#include <qsysetid.h> int qsysetgroups(int gidsetsize, gid_t grouplist[])Service Program Name: QSYSETIDS
The qsysetgroups API sets the supplementary group IDs of the calling thread. The qsysetgroups API cannot set more than (NGROUPS_MAX-1) groups in the group set.
The real group ID, effective group ID and saved group ID remain unchanged.
Job scoped locks with a lock state of *SHRRD are held on the user profiles associated with the real user ID, effective user ID, saved user ID, real group ID, effective group ID, saved group ID, and all of the supplemental groups.
0 | qsysetgroups() was successful. |
-1 | qsysetgroups() was not successful. The errno global variable is set to indicate the error. |
If qsysetgroups() 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 |
---|---|
[EAGAIN] |
User profile associated with a gid is locked. Try again. |
[EDAMAGE] |
The user profile associated with a gid or an internal system object is damaged. |
[EINVAL] |
One of the GID values in the grouplist argument is not valid. Following are possible reasons:
|
[ENOTSUP] |
Operation not supported. The current effective user profile specifies OWNER(*GRPPRF), but the user's first group is not equal to the current effective group profile and the user's first group is not in this list of supplemental groups. |
[EPERM] |
Operation not permitted. Following are possible reasons:
|
[EUNKNOWN] |
An unknown error has occurred. Check the joblog for error messages. |
Top | UNIX-Type APIs | APIs by category |