Try to fix SIGIO problem with Sun machines, h_errno with
[unix-history] / usr / src / lib / libc / sys / Xsetregid.2
CommitLineData
0ede59a6
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
dbf001ae 5.\" @(#)Xsetregid.2 6.2 (Berkeley) %G%
0ede59a6 6.\"
57ac33a0 7.TH SETREGID 2 ""
0ede59a6
KM
8.UC 5
9.SH NAME
10setregid \- set real and effective group ID
11.SH SYNOPSIS
dbf001ae
KM
12.nf
13.ft B
14#include <sys/types.h>
15.PP
0ede59a6
KM
16.ft B
17setregid(rgid, egid)
18.br
dbf001ae 19gid_t rgid, egid;
0ede59a6
KM
20.ft R
21.SH DESCRIPTION
22The real and effective group ID's of the current process
23are set to the arguments.
57ac33a0
KM
24Unprivileged users may change the real group
25ID to the effective group ID and vice-versa; only the super-user may
26make other changes.
0ede59a6
KM
27.PP
28Supplying a value of \-1 for either the real or effective
29group ID forces the system to substitute the current
30ID in place of the \-1 parameter.
31.SH "RETURN VALUE
32Upon successful completion, a value of 0 is returned. Otherwise,
33a value of \-1 is returned and \fIerrno\fP is set to indicate the error.
34.SH "ERRORS
35.TP 15
36[EPERM]
37The current process is not the super-user and a change
38other than changing the effective group-id to the real group-id
39was specified.
40.SH "SEE ALSO"
41getgid(2), setreuid(2), setgid(3)