Line | |
---|
1 | .TH SETSID 2
|
---|
2 | .SH NAME
|
---|
3 | setsid, getpgrp \- create process group, get process group id
|
---|
4 | .SH SYNOPSIS
|
---|
5 | .ft B
|
---|
6 | .nf
|
---|
7 | #include <sys/types.h>
|
---|
8 | #include <unistd.h>
|
---|
9 |
|
---|
10 | pid_t setsid(void)
|
---|
11 | pid_t getpgrp(void)
|
---|
12 | .fi
|
---|
13 | .ft P
|
---|
14 | .SH DESCRIPTION
|
---|
15 | .B Setsid()
|
---|
16 | creates a new session if the calling process is not already a session
|
---|
17 | leader. The calling process becomes the session leader of a new process
|
---|
18 | group and the process group ID of this new process group will be equal to
|
---|
19 | the process ID of the new session leader. The process group ID is inherited
|
---|
20 | on a
|
---|
21 | .BR fork (2).
|
---|
22 | .PP
|
---|
23 | .B Getpgrp()
|
---|
24 | returns the process group ID of the calling process.
|
---|
25 | .SH "SEE ALSO"
|
---|
26 | .BR kill (2),
|
---|
27 | .BR termios (3),
|
---|
28 | .BR tty (4).
|
---|
29 | .SH DIAGNOSTICS
|
---|
30 | .B Setsid()
|
---|
31 | returns the new process group ID on success, or \-1 with
|
---|
32 | .B errno
|
---|
33 | set to
|
---|
34 | .B EPERM
|
---|
35 | if the process is already a session leader.
|
---|
36 | .SH AUTHOR
|
---|
37 | Kees J. Bot (kjb@cs.vu.nl)
|
---|
38 |
|
---|
39 | .\"
|
---|
40 | .\" $PchId: setsid.2,v 1.2 1996/04/11 06:06:36 philip Exp $
|
---|
Note:
See
TracBrowser
for help on using the repository browser.