getpgrp.2
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 58 行
2
58 行
.\" SCCSID: @(#)getpgrp.2 2.4 8/10/87.TH getpgrp 2.SH Namegetpgrp \- get process group.SH Syntax.nf.B #include <sys/types.h>.B #include <unistd.h>.PP.B pgrp = getpgrp(\fIpid\fP).B pid_t pgrp;.B pid_t \fIpid\fP;.fi.SH Description.NXR "getpgrp system call".NXA "getpgrp system call" "setpgrp system call".NXA "getpgrp system call" "tty interface".NXR "process" "getting process group".NXR "process group" "defined"The system call .PN getprgrp returns the process group of the specified process.If.I pidis zero, the call applies to the current process..PPProcess groups are used for distribution of signals andby terminals to arbitrate requests for their input. Processesthat have the same process group as the terminal are the foregroundand may read, while others block with a signal if they attemptto read..PPThis call is used by programs such as .MS csh 1to create process groups in implementing job control.The TIOCGPGRP and TIOCSPGRP calls described in .MS tty 4are used to get and set the process group of the control terminal..SH EnvironmentWhen your program is compiled in the System V or POSIX environment,.PN getpgrpis called without arguments and the process group of thecurrent process is returned. .PPAdditionally, in POSIX mode, .PN getpgrp returns a value type of .I pid_t..SH DiagnosticsThe.PN getpgrpcall fails under the following condition:.TP 15[ESRCH]No such process, PID..SH See Alsogetuid(2), setpgrp(2), tty(4)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?