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

NAME

6       setpgrp - set the process group ID
7

SYNOPSIS

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

DESCRIPTION

15       If  the calling process is not already a session leader, setpgrp() sets
16       the process group ID of the calling process to the process  ID  of  the
17       calling  process. If setpgrp() creates a new session, then the new ses‐
18       sion has no controlling terminal.
19
20       The setpgrp() function has no effect when the calling process is a ses‐
21       sion leader.
22

RETURN VALUE

24       Upon completion, setpgrp() shall return the process group ID.
25

ERRORS

27       No errors are defined.
28
29       The following sections are informative.
30

EXAMPLES

32       None.
33

APPLICATION USAGE

35       None.
36

RATIONALE

38       None.
39

FUTURE DIRECTIONS

41       None.
42

SEE ALSO

44       exec() , fork() , getpid() , getsid() , kill() , setpgid() , setsid() ,
45       the Base Definitions volume of IEEE Std 1003.1-2001, <unistd.h>
46
48       Portions of this text are reprinted and reproduced in  electronic  form
49       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
50       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
51       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
52       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
53       event of any discrepancy between this version and the original IEEE and
54       The Open Group Standard, the original IEEE and The Open Group  Standard
55       is  the  referee document. The original Standard can be obtained online
56       at http://www.opengroup.org/unix/online.html .
57
58
59
60IEEE/The Open Group                  2003                           SETPGRP(P)
Impressum