OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / tcgetsid.3
1 .\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\"*******************************************************************
24 .\"
25 .\" This file was generated with po4a. Translate the source file.
26 .\"
27 .\"*******************************************************************
28 .TH TCGETSID 3 2010\-09\-10 GNU "Linux Programmer's Manual"
29 .SH 名前
30 tcgetsid \- セッションID を取得する
31 .SH 書式
32 \fB#define _XOPEN_SOURCE 500\fP /* feature_test_macros(7) 参照 */
33 .br
34 \fB#include <termios.h>\fP
35 .sp
36 \fBpid_t tcgetsid(int \fP\fIfd\fP\fB);\fP
37 .SH 説明
38 関数 \fBtcgetsid\fP()  は、制御端末として \fIfd\fP に対応する端末を持つカレント・セッションのセッションID を返す。 この端末は
39 \fBtcgetsid\fP() の呼び出しを行うプロセスの制御端末で なければならない。
40 .SH 返り値
41 \fIfd\fP が呼び出しを行ったセッションの制御端末を参照している場合、 関数 \fBtcgetsid\fP()  はこのセッションのセッションID を返す。
42 そうでない場合、 \-1 が返され、 \fIerrno\fP が適切に設定される。
43 .SH エラー
44 .TP 
45 \fBEBADF\fP
46 \fIfd\fP が有効なファイルディスクリプタではない。
47 .TP 
48 \fBENOTTY\fP
49 呼び出しを行ったプロセスが制御端末を持っていない、もしくは 制御端末を持っているが \fIfd\fP で参照されるものとは異なる。
50 .SH バージョン
51 \fBtcgetsid\fP()  は、バージョン 2.1 以降の glibc で提供されている。
52 .SH 準拠
53 POSIX.1\-2001.
54 .SH 注意
55 この関数は \fBTIOCGSID\fP \fBioctl\fP(2)  経由で実現されており、 Linux 2.1.71 以降で存在する。
56 .SH 関連項目
57 \fBgetsid\fP(2)