|
|
1.1 root 1: .TH GETPGRP 2 "2 July 1983"
2: .UC 4
3: .SH NAME
4: getpgrp \- get process group
5: .SH SYNOPSIS
6: .ft B
7: .nf
8: pgrp = getpgrp(pid)
9: int prgp;
10: int pid;
11: .fi
12: .ft R
13: .SH DESCRIPTION
14: The process group of the specified process is returned by
15: .I getpgrp.
16: If
17: .I pid
18: is zero, then the call applies to the current process.
19: .PP
20: Process groups are used for distribution of signals, and
21: by terminals to arbitrate requests for their input: processes
22: which have the same process group as the terminal are foreground
23: and may read, while others will block with a signal if they attempt
24: to read.
25: .PP
26: This call is thus used by programs such as
27: .IR csh (1)
28: to create
29: process groups
30: in implementing job control.
31: The TIOCGPGRP and TIOCSPGRP calls
32: described in
33: .IR tty (4)
34: are used to get/set the process group of the control terminal.
35: .SH "SEE ALSO"
36: setpgrp(2), getuid(2), tty(4)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.