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

NAME

12       getpgid - get the process group ID for a process
13

SYNOPSIS

15       #include <unistd.h>
16
17       pid_t getpgid(pid_t pid);
18
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() shall
23       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
41       The getpgid() function may fail if:
42
43       EINVAL The value of the pid argument is invalid.
44
45
46       The following sections are informative.
47

EXAMPLES

49       None.
50

APPLICATION USAGE

52       None.
53

RATIONALE

55       None.
56

FUTURE DIRECTIONS

58       None.
59

SEE ALSO

61       exec(), fork(), getpgrp(), getpid(), getsid(), setpgid(), setsid(), the
62       Base Definitions volume of IEEE Std 1003.1-2001, <unistd.h>
63
65       Portions of this text are reprinted and reproduced in  electronic  form
66       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
67       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
68       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
69       Electrical and Electronics Engineers, Inc and The Open  Group.  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.opengroup.org/unix/online.html .
74
75
76
77IEEE/The Open Group                  2003                          GETPGID(3P)
Impressum