getpgrp()

NAME

getpgrp() - get process group

SYNOPSIS

#include <unistd.h>

pid_t getpgrp (void)

DESCRIPTION

The getpgrp(2) function returns the process group ID of the current process.

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.

RETURN VALUE

The getpgrp(2) function is always successful and no return value is reserved to indicate an error.

SEE ALSO

setpgid(2)

setsid(2)