setpgrp.2

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 61 行

2
61
字号
.\" SCCSID: @(#)setpgrp.2	2.3	8/10/87.TH setpgrp 2.SH Namesetpgrp \- set process group.SH Syntax.ft Bsetpgrp(pid, pgrp).brint pid, pgrp;.ft R.SH Description.NXR "setpgrp system call".NXA "setpgrp system call" "getpgrp system call".NXR "process group" "setting"The.PN setpgrpsystem callsets the process group of the specified process.I pidto the specified.IR pgrp .If.I pidis zero, the call applies to the current process..PPIf the invoker is not the superuser, the affected processmust either have the same effective user-id as the invoker or be a descendant of the invoking process..SH Return ValuesThe.PN setpgrpsystem callreturns zero (0) when the operation is successful.  Ifthe request fails, \-1 is returned, and the globalvariable.I errnoindicates the reason..SH EnvironmentSYSTEM_FIVE.PPWhen your program is compiled using the System V environment,.PN setpgrpis called without arguments andthe new process group id is returned if successful..SH DiagnosticsThe.PN setpgrpsystem callfails and the process group is not altered, ifone of the following occur:.TP 15[EPERM]The effective user ID of the requested process is differentfrom that of the caller and the process is not a descendentof the calling process..TP 15[ESRCH]The requested process does not exist..SH See Alsogetpgrp(2)

⌨️ 快捷键说明

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