[Previous] [Contents] [Next]

getpgid()

Get a process's group ID

Synopsis:

#include <unistd.h>

pid_t getpgid( pid_t pid );

Library:

libc

Description:

The getpgid() returns the process group ID for the process specified by pid. If pid is 0, getpgid() returns the calling process's group ID.

Returns:

A process group ID for success, or (pid_t)-1 if an error occurs.

Errors:

If an error occurs, errno is set to:

ESRCH
The process specified by pid doesn't exist.

Classification:

Standard Unix

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

getegid(), getgid(), setpgid()


[Previous] [Contents] [Next]