Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getpgrp(2) — Ultrix-32 3.1D RISC

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getuid(2)

setpgrp(2)

tty(4)

getpgrp(2)

NAME

getpgrp − get process group

SYNTAX

pgrp = getpgrp(pid)
int prgp;
int pid;

DESCRIPTION

The system call getprgrp returns the specified process of the process group. If pid is zero, the call applies to the current process. 

Process groups are used for distribution of signals and by terminals to arbitrate requests for their input.  Processes which have the same process group as the terminal are the foreground and may read, while others block with a signal if they attempt to read. 

This call is used by programs such as csh() to create process groups in implementing job control. The TIOCGPGRP and TIOCSPGRP calls described in tty() are used to get and/or set the process group of the control terminal.

ENVIRONMENT

SYSTEM_FIVE
POSIX

When your program is compiled in the System V or POSIX environment, getpgrp is called without arguments and the process group of the current process is returned.

Additionally, in POSIX mode, getpgrp returns a value type of pid_t.

DIAGNOSTICS

[ESRCH] No such process, PID. 

SEE ALSO

getuid(2), setpgrp(2), tty(4)

System Calls

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026