OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man2 / getsid.2
1 .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" The GNU General Public License's references to "object code"
9 .\" and "executables" are to be interpreted as the output of any
10 .\" document formatting or typesetting system, including
11 .\" intermediate and printed output.
12 .\"
13 .\" This manual is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 .\" GNU General Public License for more details.
17 .\"
18 .\" You should have received a copy of the GNU General Public
19 .\" License along with this manual; if not, write to the Free
20 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
21 .\" USA.
22 .\"
23 .\" Modified Thu Oct 31 14:18:40 1996 by Eric S. Raymond <esr@y\thyrsus.com>
24 .\" Modified 2001-12-17, aeb
25 .\"*******************************************************************
26 .\"
27 .\" This file was generated with po4a. Translate the source file.
28 .\"
29 .\"*******************************************************************
30 .TH GETSID 2 2010\-09\-26 Linux "Linux Programmer's Manual"
31 .SH 名前
32 getsid \- セッション ID を取得する。
33 .SH 書式
34 \fB#include <unistd.h>\fP
35 .sp
36 \fBpid_t getsid(pid_t\fP\fI pid\fP\fB);\fP
37 .sp
38 .in -4n
39 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
40 .in
41 .sp
42 .ad l
43 .PD 0
44 \fBgetsid\fP():
45 .RS 4
46 _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
47 .br
48 || /* glibc 2.12 以降: */ _POSIX_C_SOURCE\ >=\ 200809L
49 .RE
50 .PD
51 .ad
52 .SH 説明
53 \fIgetsid(0)\fP は呼び出し元のプロセスのセッション ID を返す。 \fIgetsid(p)\fP はプロセス ID \fIp\fP
54 を持つプロセスのセッション ID を返す (プロセスのセッション ID は セッションリーダーのプロセスグループ ID である)。
55 .SH 返り値
56 成功すると、セッション ID が返される。 エラーの場合、\fI(pid_t) \-1\fP が返され、 \fIerrno\fP が適切に設定される。
57 .SH エラー
58 .TP 
59 \fBEPERM\fP
60 プロセス ID \fIp\fP のプロセスは存在するが、呼び出し元のプロセスと同じセッションではなく、 さらに実装がこの状態をエラーと判断した場合。
61 .TP 
62 \fBESRCH\fP
63 プロセス ID が \fIp\fP のプロセスがない。
64 .SH バージョン
65 .\" Linux has this system call since Linux 1.3.44.
66 .\" There is libc support since libc 5.2.19.
67 このシステムコールは Linux バージョン 2.0 以降で利用可能である。
68 .SH 準拠
69 SVr4, POSIX.1\-2001.
70 .SH 注意
71 Linux は \fBEPERM\fP を返さない。
72 .SH 関連項目
73 \fBgetpgid\fP(2), \fBsetsid\fP(2), \fBcredentials\fP(7)