⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setregid.2

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 2
字号:
.\" SCCSID: @(#)setregid.2	8.1	9/11/90.TH setregid 2.SH Namesetregid \- set real and effective group ID.SH Syntax.B setregid(\fIrgid, egid\fP).br.B int \fIrgid, egid\fP;.SH Description.NXR "setregid system call".NXR "real group ID" "setting".NXR "effective group ID" "setting"The real and effective group ID's of the current processare set to the arguments..PPSupplying a value of \-1 for either the real or effectivegroup ID forces the system to substitute the currentID for the \-1 parameter..SH Environment.PP.B BSD.br If the process is superuser, or.PN rgidand.PN egidmatches with the real group ID, the effective group ID, or the savedset-group-id (as described in.MS execve 2), then the real, effective, and saved set-group-id are set to .PN rgid ,.PN egid ,and.PN egid ,respectively..PP .B POSIX.br.B SYSTEM-FIVE.br When your program is compiled in POSIX or SYSTEM-FIVE mode, thefollowing semantics apply when using the .PN setregidfunction..PPIf the process is the superuser, the real, effective, and savedset-group-id (as described in .MS execve 2) are set to .PN rgid ,.PN egid ,and.PN egid ,respectively..PPIf the process is not the superuser, but the.PN rgidand.PN egidmatches the real group ID, the effective group ID(only in SYSTEM-FIVE and BSD environment), or the saved set-group-id,then the effective ID is set to.PN egid. The real group ID and the saved set-group-id are left unchanged..SH Return ValuesUpon successful completion, a value of zero (0) is returned.  Otherwise,a value of \-1 is returned, and \fIerrno\fP is set to indicate the error..SH Diagnostics.TP 15[EPERM]The current process is not the superuser and the.PN egidand.PN rgidspecified does not match with the real group ID or the effective groupID (only in SYSTEM-FIVE and BSD environment) or the saved set-group-id..SH See Alsogetgid(2), setreuid(2), setgid(3)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -