OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / draft / man3 / ctermid.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
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 .\" License.
23 .\" Modified Sat Jul 24 19:51:06 1993 by Rik Faith (faith@cs.unc.edu)
24 .\"
25 .\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya
26 .\"         all rights reserved.
27 .\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
28 .\"
29 .TH CTERMID 3  2007-07-26 "GNU" "Linux Programmer's Manual"
30 .\"O .SH NAME
31 .SH Ì¾Á°
32 .\"O ctermid \- get controlling terminal name
33 ctermid \- À©¸æüËö̾¤Î¼èÆÀ
34 .\"O .SH SYNOPSIS
35 .SH ½ñ¼°
36 .nf
37 .B #include <stdio.h>
38 .\" POSIX also requires this function to be declared in <unistd.h>,
39 .\" and glibc does so if suitable feature test macros are defined.
40 .sp
41 .BI "char *ctermid(char *" "s" );
42 .fi
43 .sp
44 .in -4n
45 .\"O Feature Test Macro Requirements for glibc (see
46 .\"O .BR feature_test_macros (7)):
47 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
48 .RB ( feature_test_macros (7)
49 »²¾È):
50 .in
51 .sp
52 .BR ctermid ():
53 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
54 .\" From <unistd.h>: _XOPEN_SOURCE
55 .\"O .SH DESCRIPTION
56 .SH ÀâÌÀ
57 .\"O .BR ctermid ()
58 .\"O returns a string which is the pathname for the current
59 .\"O controlling terminal for this process.
60 .\"O If
61 .\"O .I s
62 .\"O is NULL,
63 .\"O a static buffer is used, otherwise
64 .\"O .I s
65 .\"O points to a buffer used to hold the terminal pathname.
66 .\"O The symbolic constant
67 .\"O .B L_ctermid
68 .\"O is the maximum number of characters in the returned pathname.
69 .BR ctermid ()
70 ¤Ï¥×¥í¥»¥¹¤Î¸½ºß¤ÎÀ©¸æüËö¤Î¥Ñ¥¹Ì¾¤òÊÖ¤¹¡£
71 .I s
72 ¤¬ NULL ¤Î¾ì¹ç¡¢ÀÅŪ¤Ê¥Ð¥Ã¥Õ¥¡¤òÍѤ¤¤ë¡£¤½¤ì°Ê³°¤Î¾ì¹ç¡¢
73 .I s
74 ¤ÏüËö¥Ñ¥¹Ì¾¤òÊÝ»ý¤¹¤ë¤Î¤Ë»ÈÍѤµ¤ì¤ë¥Ð¥Ã¥Õ¥¡¤Ø¤Î¥Ý¥¤¥ó¥¿¤È¤Ê¤ë¡£
75 ¥·¥ó¥Ü¥ëÄê¿ô
76 .B L_ctermid
77 ¤ÏÊÖ¤µ¤ì¤ë¥Ñ¥¹Ì¾¤ÎºÇÂçʸ»ú¿ô¤Ç¤¢¤ë¡£
78 .\"O .SH "RETURN VALUE"
79 .SH ÊÖ¤êÃÍ
80 .\"O The pointer to the pathname.
81 ¥Ñ¥¹Ì¾¤Ø¤Î¥Ý¥¤¥ó¥¿¡£
82 .\"O .SH "CONFORMING TO"
83 .SH ½àµò
84 SVr4, POSIX.1-2001.
85 .\"O .SH BUGS
86 .SH ¥Ð¥°
87 .\"O The path returned may not uniquely identify the controlling
88 .\"O terminal; it may, for example, be
89 .\"O .IR /dev/tty .
90 ÊÖ¤µ¤ì¤¿¥Ñ¥¹¤Ï¤¿¤Ö¤óÀ©¸æüËö¤ò°ì°Õ¤Ë¤ÏÆÃÄê¤Ç¤­¤Ê¤¤¡£
91 ¤¿¤È¤¨¤Ð
92 .I /dev/tty
93 ¤Î¤è¤¦¤Ë¡£
94 .PP
95 .\"O It is not assured that the program can open the terminal.
96 ¥×¥í¥°¥é¥à¤¬Ã¼Ëö¤ò¥ª¡¼¥×¥ó¤Ç¤­¤ë¤³¤È¤ÏÊݾڤµ¤ì¤Æ¤¤¤Ê¤¤¡£
97 .\" in glibc 2.3.x, x >= 4, the glibc headers threw an error
98 .\" if ctermid() was given an argument; fixed in 2.4.
99 .\"O .SH "SEE ALSO"
100 .SH ´ØÏ¢¹àÌÜ
101 .BR ttyname (3)