# Method System.setgid()

Method setgid

  ``int` setgid(`int` `gid`)`

Description

  Sets the real group ID, effective group ID and saved group ID to `gid`. If `gid` is `-1` the uid for "nobody" will be used.

Throws

  Throws an error if no "nobody" user when `gid` is `-1`.

Returns

  Returns the current errno.

Note

  This function is not available on all platforms.

See also

  getuid(), setuid(), getgid(), seteuid(), geteuid(), setegid(), getegid()