up | Inhaltsverzeichniss | Kommentar

Manual page for GETPGRP(2)

getpgrp - get process group

BSD SYNOPSIS

#include <sys/types.h>

pid_t getpgrp(int pid);

POSIX SYNOPSIS

#include <sys/types.h>

pid_t getpgrp(void);

DESCRIPTION

The BSD version of getpgrp returns the process group ID of the process with ID pid. If pid is 0, or if the calling application is a POSIX application, then the process group ID of the current process is returned.

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 foreground and may read, while others will block with a signal if they attempt to read. Each process group is the member of one session.

This call is thus used by programs such as csh(1) to create process groups in implementing job control. To get/set the process group of the controlling terminal, BSD applications use the TIOCGPGRP and TIOCSPGRP calls described in tty.4 and POSIX applications use the tcgetpgrp.2p and tcsetpgrp.2p functions.

SEE ALSO

setsid(2P), setpgid(2P), setpgrp(2), getuid(2), tcgetpgrp(2P), tcsetpgrp(2P), tty(4)


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97