OSDN Git Service

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