GETPGRP(2) UNIX Programmer's Manual GETPGRP(2)
getpgrp - get process group
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
p
\bpg
\bgr
\brp
\bp =
\b= g
\bge
\bet
\btp
\bpg
\bgr
\brp
\bp(
\b(p
\bpi
\bid
\bd)
\b)
i
\bin
\bnt
\bt p
\bpg
\bgr
\brp
\bp;
\b;
i
\bin
\bnt
\bt p
\bpi
\bid
\bd;
\b;
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
The process group of the specified process is returned by
_
\bg_
\be_
\bt_
\bp_
\bg_
\br_
\bp. If _
\bp_
\bi_
\bd is zero, then the call applies to the
Process groups are used for distribution of signals, and by
terminals to arbitrate requests for their input: processes
that have the same process group as the terminal are fore-
ground and may read, while others will block with a signal
This call is thus used by programs such as _
\bc_
\bs_
\bh(1) to create
process groups in implementing job control. The TIOCGPGRP
and TIOCSPGRP calls described in _
\bt_
\bt_
\by(4) are used to get/set
the process group of the control terminal.
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
setpgrp(2), getuid(2), tty(4)
Printed 7/9/88 August 26, 1985 1