setregid(3)
DESCRIPTION
Sets the process real and effective GIDs. Astia's direct ABI uses the unsigned all‑ones value for the libc −1 sentinel.
SYNOPSIS
#include <unistd.h> int setregid(gid_t real_gid, gid_t effective_gid);
RETURN VALUE
- Returns zero, or -1 and sets errno.
ERRORS
-EINVAL- An argument is outside the direct ABI range.
-EPERM- The requested transition is not allowed.
-ESRCH- The calling process does not exist.
NOTES
The current implementation accepts the current real or effective GID for a non‑root caller.