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
Get a process group ID
#include <unistd.h>
pid_t getpgid( pid_t pid );
- pid
- The ID of the process whose process group ID you want to get.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
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.
A process group ID for success, or (pid_t)-1 if an
error occurs.
If an error occurs,
errno
is set to:
- ESRCH
- The process specified by pid doesn't exist.
POSIX 1003.1 XSI
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
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