int setresgid(int rgid, int egid, int sgid)
Sets the real, effective and saved group ID to rgid , egid and sgid respectively.
Returns zero on success and errno on failure.