Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getpgid.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getpgid.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getpgid.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getpgid.html on line 8

getpgid()

Get a process group ID

Synopsis:

#include <unistd.h>

pid_t getpgid( pid_t pid );

Arguments:

pid
The ID of the process whose process group ID you want to get.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

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

The following definitions are worth mentioning:

Process
An executing instance of a program, identified by a nonnegative integer called a process ID.
Process group
A collection of one or more processes, with a unique process group ID. A process group ID is a positive integer.

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:

POSIX 1003.1 XSI

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

See also:

getsid(), setpgid(), setsid()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getpgid.html on line 145

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getpgid.html on line 145