OSDN Git Service

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