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

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       getpgid — get the process group ID for a process
14

SYNOPSIS

16       #include <unistd.h>
17
18       pid_t getpgid(pid_t pid);
19

DESCRIPTION

21       The getpgid() function shall return the process group ID of the process
22       whose  process  ID  is  equal  to pid.  If pid is equal to 0, getpgid()
23       shall return the process group ID of the calling process.
24

RETURN VALUE

26       Upon successful completion, getpgid() shall return a process group  ID.
27       Otherwise,  it  shall  return  (pid_t)−1  and set errno to indicate the
28       error.
29

ERRORS

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

EXAMPLES

47       None.
48

APPLICATION USAGE

50       None.
51

RATIONALE

53       None.
54

FUTURE DIRECTIONS

56       None.
57

SEE ALSO

59       exec, fork(), getpgrp(), getpid(), getsid(), setpgid(), setsid()
60
61       The Base Definitions volume of POSIX.1‐2008, <unistd.h>
62
64       Portions  of  this text are reprinted and reproduced in electronic form
65       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
66       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
67       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
68       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
69       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
70       event of any discrepancy between this version and the original IEEE and
71       The Open Group Standard, the original IEEE and The Open Group  Standard
72       is  the  referee document. The original Standard can be obtained online
73       at http://www.unix.org/online.html .
74
75       Any typographical or formatting errors that appear  in  this  page  are
76       most likely to have been introduced during the conversion of the source
77       files to man page format. To report such errors,  see  https://www.ker
78       nel.org/doc/man-pages/reporting_bugs.html .
79
80
81
82IEEE/The Open Group                  2013                          GETPGID(3P)
Impressum