Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setregid(2) — Ultrix-11 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getuid(2)

setuid(2)

setreuid(2)

seteuid(3)

setregid(2)

NAME

setregid − set real and effective group IDs

SYNTAX

int setregid(rgid, egid)
int rgid, egid;

DESCRIPTION

The setregid system call sets the real and effective group IDs of the current process to rgid and egid. If either rgid or egid is a −1, the appropriate gid is filled in by the system. 

RESTRICTIONS

Only the superuser may change the real group ID of a process.  Users other than the superuser may change the effective group ID of the process only to the real group ID. 

RETURN VALUE

If unsuccessful, returns a −1, and the global variable errno indicates the error code. 

DIAGNOSTICS

The setregid call will fail if:

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

SEE ALSO

getuid(2), setuid(2), setreuid(2), seteuid(3)

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