1GETPGID(P)                 POSIX Programmer's Manual                GETPGID(P)
2
3
4

NAME

6       getpgid - get the process group ID for a process
7

SYNOPSIS

9       #include <unistd.h>
10
11       pid_t getpgid(pid_t pid);
12
13

DESCRIPTION

15       The getpgid() function shall return the process group ID of the process
16       whose process ID is equal to pid. If pid is equal to 0, getpgid() shall
17       return the process group ID of the calling process.
18

RETURN VALUE

20       Upon  successful completion, getpgid() shall return a process group ID.
21       Otherwise, it shall return (pid_t)-1 and  set  errno  to  indicate  the
22       error.
23

ERRORS

25       The getpgid() function shall fail if:
26
27       EPERM  The  process whose process ID is equal to pid is not in the same
28              session as the calling process, and the implementation does  not
29              allow  access  to  the process group ID of that process from the
30              calling process.
31
32       ESRCH  There is no process with a process ID equal to pid.
33
34
35       The getpgid() function may fail if:
36
37       EINVAL The value of the pid argument is invalid.
38
39
40       The following sections are informative.
41

EXAMPLES

43       None.
44

APPLICATION USAGE

46       None.
47

RATIONALE

49       None.
50

FUTURE DIRECTIONS

52       None.
53

SEE ALSO

55       exec() , fork() , getpgrp() , getpid() , getsid() ,  setpgid()  ,  set‐
56       sid() , the Base Definitions volume of IEEE Std 1003.1-2001, <unistd.h>
57
59       Portions  of  this text are reprinted and reproduced in electronic form
60       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
61       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
62       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
63       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
64       event of any discrepancy between this version and the original IEEE and
65       The  Open Group Standard, the original IEEE and The Open Group Standard
66       is the referee document. The original Standard can be  obtained  online
67       at http://www.opengroup.org/unix/online.html .
68
69
70
71IEEE/The Open Group                  2003                           GETPGID(P)
Impressum