OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[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 .\" 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>
27 .\"
28 .TH TCGETSID 3 2008-06-14 "GNU" "Linux Programmer's Manual"
29 .\"O .SH NAME
30 .\"O tcgetsid \- get session ID
31 .SH Ì¾Á°
32 tcgetsid \- ¥»¥Ã¥·¥ç¥óID ¤ò¼èÆÀ¤¹¤ë
33 .\"O .SH SYNOPSIS
34 .SH ½ñ¼°
35 .B #define _XOPEN_SOURCE 500
36 .br
37 .B "#include <termios.h>"
38 .sp
39 .BI "pid_t tcgetsid(int " fd );
40 .\"O .SH DESCRIPTION
41 .SH ÀâÌÀ
42 .\"O The function
43 .\"O .BR tcgetsid ()
44 .\"O returns the session ID of the current session that has the
45 .\"O terminal associated to
46 .\"O .I fd
47 .\"O as controlling terminal.
48 .\"O This terminal must be the controlling terminal of the calling process.
49 ´Ø¿ô
50 .BR tcgetsid ()
51 ¤Ï¡¢À©¸æüËö¤È¤·¤Æ
52 .I fd
53 ¤ËÂбþ¤¹¤ëüËö¤ò»ý¤Ä¥«¥ì¥ó¥È¡¦¥»¥Ã¥·¥ç¥ó¤Î¥»¥Ã¥·¥ç¥óID ¤òÊÖ¤¹¡£
54 ¤³¤ÎüËö¤Ï \fBtcgetsid\fR() ¤Î¸Æ¤Ó½Ð¤·¤ò¹Ô¤¦¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤Ç
55 ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
56 .\"O .SH "RETURN VALUE"
57 .SH ÊÖ¤êÃÍ
58 .\"O When
59 .\"O .I fd
60 .\"O refers to the controlling terminal of our session,
61 .\"O the function
62 .\"O .BR tcgetsid ()
63 .\"O will return the session ID of this session.
64 .I fd
65 ¤¬¸Æ¤Ó½Ð¤·¤ò¹Ô¤Ã¤¿¥»¥Ã¥·¥ç¥ó¤ÎÀ©¸æüËö¤ò»²¾È¤·¤Æ¤¤¤ë¾ì¹ç¡¢
66 ´Ø¿ô
67 .BR tcgetsid ()
68 ¤Ï¤³¤Î¥»¥Ã¥·¥ç¥ó¤Î¥»¥Ã¥·¥ç¥óID ¤òÊÖ¤¹¡£
69 .\"O Otherwise, \-1 is returned, and
70 .\"O .I errno
71 .\"O is set appropriately.
72 ¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¡¢ \-1 ¤¬ÊÖ¤µ¤ì¡¢
73 .I errno
74 ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
75 .\"O .SH ERRORS
76 .SH ¥¨¥é¡¼
77 .TP
78 .B EBADF
79 .\"O .I fd
80 .\"O is not a valid file descriptor.
81 .I fd
82 ¤ÏÍ­¸ú¤Ê¥Õ¥¡¥¤¥ëµ­½Ò»Ò¤Ç¤Ê¤¤¡£
83 .TP
84 .B ENOTTY
85 .\"O The calling process does not have a controlling terminal, or
86 .\"O it has one but it is not described by
87 .\"O .IR fd .
88 ¸Æ¤Ó½Ð¤·¤ò¹Ô¤Ã¤¿¥×¥í¥»¥¹¤¬À©¸æüËö¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡¢¤â¤·¤¯¤Ï
89 À©¸æüËö¤ò»ý¤Ã¤Æ¤¤¤ë¤¬
90 .I fd
91 ¤Ç»²¾È¤µ¤ì¤ë¤â¤Î¤È¤Ï°Û¤Ê¤ë¡£
92 .\"O .SH VERSIONS
93 .SH ¥Ð¡¼¥¸¥ç¥ó
94 .\"O .BR tcgetsid ()
95 .\"O is provided in glibc since version 2.1.
96 .BR tcgetsid ()
97 ¤Ï¡¢¥Ð¡¼¥¸¥ç¥ó 2.1 °Ê¹ß¤Î glibc ¤ÇÄ󶡤µ¤ì¤Æ¤¤¤ë¡£
98 .\"O .SH "CONFORMING TO"
99 .SH ½àµò
100 POSIX.1-2001.
101 .\"O .SH NOTES
102 .SH Ãí°Õ
103 .\"O This function is implemented via the
104 .\"O .B TIOCGSID
105 .\"O .BR ioctl (2),
106 .\"O present
107 .\"O since Linux 2.1.71.
108 ¤³¤Î´Ø¿ô¤Ï
109 .B TIOCGSID
110 .BR ioctl (2)
111 ·Ðͳ¤Ç¼Â¸½¤µ¤ì¤Æ¤ª¤ê¡¢
112 Linux 2.1.71 °Ê¹ß¤Ç¸ºß¤¹¤ë¡£
113 .\"O .SH "SEE ALSO"
114 .SH ´ØÏ¢¹àÌÜ
115 .BR getsid (2)