File: setsid.2

package info (click to toggle)
manpages-ja 0.5.0.0.20080615-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,508 kB
  • ctags: 1
  • sloc: sh: 13,690; perl: 157; makefile: 114
file content (97 lines) | stat: -rw-r--r-- 3,377 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.\" Copyright Michael Haardt (michael@cantor.informatik.rwth-aachen.de) Sat Aug 27 20:43:50 MET DST 1994
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.\" Modified Sun Sep 11 19:19:05 1994 <faith@cs.unc.edu>
.\" Modified Mon Mar 25 10:19:00 1996 <aeb@cwi.nl> (merged a few
.\"    tiny changes from a man page by Charles Livingston).
.\" Modified Sun Jul 21 14:45:46 1996 <aeb@cwi.nl>
.\"
.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
.\"         all rights reserved.
.\" Translated Sat Mar  1 16:46:43 JST 1997
.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Modified Mon May  5 19:43:49 JST 1997
.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Updated & Modified Thu Feb 10 22:45:24 JST 2005
.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
.\"
.\"WORD:	session			å
.\"WORD:	process group ID	ץ롼ID
.\"WORD:	process group leader	ץ롼ס꡼
.\"
.TH SETSID 2 1994-08-27 "Linux" "Linux Programmer's Manual"
.SH ̾
setsid \- å (session) ץ롼 ID ꤹ
.SH 
.ad l
.B #include <unistd.h>
.sp
.B pid_t setsid(void);
.br
.ad b
.SH 
.BR setsid ()
ϸƤӽФץץ롼ס꡼
(process group leader) ǤʤСå롣
ƤӽФץϿåΥ꡼ץ롼פ
ץ롼ס꡼Ȥʤꡢtty ʤ
ƤӽФץΥץ롼 ID ȥå ID ˤϡ
ƤӽФץ PID ꤵ롣ƤӽФץϤ
ץ롼סοåͣΥץȤʤ롣
.SH ֤
ƤӽФץΥå ID
.SH 顼
顼ξϡ\-1 ֤ơ
.I errno
ꤵ롣
ꤨ륨顼
.B EPERM
ΤߤǤ롣
ƤӽФץ PID ץ롼 ID ĥץ
¸ߤ֤롣ϡƤӽФץ
ץ꡼ξˤ
.BR setsid ()
ϼԤ뤳Ȥ̣롣
.SH 
SVr4, POSIX.1-2001.
.SH 
.BR fork (2)
Ǻ줿ҥץϡƥץΥå ID Ѿ롣
.BR execve (2)
ǥå ID ¸롣

ץ롼ס꡼ȤϡΥץΥץ롼 ID 
 PID ץǤ롣
.BR setsid ()
μ¤뤿ˤϡ
.BR fork (2)

.BR exit (2)
ҥץ
.BR setsid ()
Ԥʤɤ
.SH Ϣ
.BR getsid (2),
.BR setpgid (2),
.BR setpgrp (2),
.BR tcgetsid (3),
.BR credentials (7)