getresgid - get real, effective and saved group ID
#include <unistd.h>
int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
getresgid(2) (both introduced in Linux 2.1.44) get the RealID, EffectiveID and SavedID?'s of the current process.
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
This call is Linux-specific.
getuid(2), setuid(2), getreuid(2)?, setreuid(2), setresuid(2)
One page links to getresgid(2):