Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getgid(2)

setreuid(2)

setgid(3)

SETREGID(2)

NAME

setregid − set real and effective group ID

USAGE

setregid(rgid, egid) int rgid, egid;

DESCRIPTION

For the current process, setregid sets the real group ID to rgid and the effective group ID to egid.  Only the super-user may change the real group ID of a process.  Other users may only change the effective group ID to the real group ID. 

If you supply a value of -1 for either rgid or egid, the system substitutes the current ID in place of the -1 parameter. 

RETURN VALUE

A successful call returns zero.  A failed call returns -1 and sets errno as indicated below. 

ERRORS

[EPERM] The current process is not the super-user and a change other than changing the effective group-ID to the real group-ID was specified. 

RELATED INFORMATION

getgid(2), setreuid(2), setgid(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026