1 .\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
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.
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.
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
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI
24 .\" all rights reserved.
25 .\" Translated Sat Jul 19 03:06:35 JST 2003
26 .\" by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
28 .TH TCGETSID 3 2010-09-10 "GNU" "Linux Programmer's Manual"
30 .\"O tcgetsid \- get session ID
32 tcgetsid \- セッションID を取得する
36 .\"O .BR "#define _XOPEN_SOURCE 500" " /* See feature_test_macros(7) */"
37 .BR "#define _XOPEN_SOURCE 500" " /* feature_test_macros(7) 参照 */"
39 .B "#include <termios.h>"
41 .BI "pid_t tcgetsid(int " fd );
47 .\"O returns the session ID of the current session that has the
48 .\"O terminal associated to
50 .\"O as controlling terminal.
51 .\"O This terminal must be the controlling terminal of the calling process.
56 に対応する端末を持つカレント・セッションのセッションID を返す。
57 この端末は \fBtcgetsid\fR() の呼び出しを行うプロセスの制御端末で
59 .\"O .SH "RETURN VALUE"
63 .\"O refers to the controlling terminal of our session,
66 .\"O will return the session ID of this session.
68 が呼び出しを行ったセッションの制御端末を参照している場合、
72 .\"O Otherwise, \-1 is returned, and
74 .\"O is set appropriately.
83 .\"O is not a valid file descriptor.
88 .\"O The calling process does not have a controlling terminal, or
89 .\"O it has one but it is not described by
91 呼び出しを行ったプロセスが制御端末を持っていない、もしくは
98 .\"O is provided in glibc since version 2.1.
100 は、バージョン 2.1 以降の glibc で提供されている。
101 .\"O .SH "CONFORMING TO"
106 .\"O This function is implemented via the
110 .\"O since Linux 2.1.71.
115 Linux 2.1.71 以降で存在する。