OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / 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 .sp
39 .BI "char *ctermid(char *" "s" );
40 .fi
41 .sp
42 .in -4n
43 .\"O Feature Test Macro Requirements for glibc (see
44 .\"O .BR feature_test_macros (7)):
45 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
46 .RB ( feature_test_macros (7)
47 »²¾È):
48 .in
49 .sp
50 .BR ctermid ():
51 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
52 .\" From <unistd.h>: _XOPEN_SOURCE
53 .\"O .SH DESCRIPTION
54 .SH ÀâÌÀ
55 .\"O .BR ctermid ()
56 .\"O returns a string which is the pathname for the current
57 .\"O controlling terminal for this process.
58 .\"O If
59 .\"O .I s
60 .\"O is NULL,
61 .\"O a static buffer is used, otherwise
62 .\"O .I s
63 .\"O points to a buffer used to hold the terminal pathname.
64 .\"O The symbolic constant
65 .\"O .B L_ctermid
66 .\"O is the maximum number of characters in the returned pathname.
67 .BR ctermid ()
68 ¤Ï¥×¥í¥»¥¹¤Î¸½ºß¤ÎÀ©¸æüËö¤Î¥Ñ¥¹Ì¾¤òÊÖ¤¹¡£
69 .I s
70 ¤¬ NULL ¤Î¾ì¹ç¡¢ÀÅŪ¤Ê¥Ð¥Ã¥Õ¥¡¤òÍѤ¤¤ë¡£¤½¤ì°Ê³°¤Î¾ì¹ç¡¢
71 .I s
72 ¤ÏüËö¥Ñ¥¹Ì¾¤òÊÝ»ý¤¹¤ë¤Î¤Ë»ÈÍѤµ¤ì¤ë¥Ð¥Ã¥Õ¥¡¤Ø¤Î¥Ý¥¤¥ó¥¿¤È¤Ê¤ë¡£
73 ¥·¥ó¥Ü¥ëÄê¿ô
74 .B L_ctermid
75 ¤ÏÊÖ¤µ¤ì¤ë¥Ñ¥¹Ì¾¤ÎºÇÂçʸ»ú¿ô¤Ç¤¢¤ë¡£
76 .\"O .SH "RETURN VALUE"
77 .SH ÊÖ¤êÃÍ
78 .\"O The pointer to the pathname.
79 ¥Ñ¥¹Ì¾¤Ø¤Î¥Ý¥¤¥ó¥¿¡£
80 .\"O .SH "CONFORMING TO"
81 .SH ½àµò
82 SVr4, POSIX.1-2001.
83 .\"O .SH BUGS
84 .SH ¥Ð¥°
85 .\"O The path returned may not uniquely identify the controlling
86 .\"O terminal; it may, for example, be
87 .\"O .IR /dev/tty .
88 ÊÖ¤µ¤ì¤¿¥Ñ¥¹¤Ï¤¿¤Ö¤óÀ©¸æüËö¤ò°ì°Õ¤Ë¤ÏÆÃÄê¤Ç¤­¤Ê¤¤¡£
89 ¤¿¤È¤¨¤Ð
90 .I /dev/tty
91 ¤Î¤è¤¦¤Ë¡£
92 .PP
93 .\"O It is not assured that the program can open the terminal.
94 ¥×¥í¥°¥é¥à¤¬Ã¼Ëö¤ò¥ª¡¼¥×¥ó¤Ç¤­¤ë¤³¤È¤ÏÊݾڤµ¤ì¤Æ¤¤¤Ê¤¤¡£
95 .\" in glibc 2.3.x, x >= 4, the glibc headers threw an error
96 .\" if ctermid() was given an argument; fixed in 2.4.
97 .\"O .SH "SEE ALSO"
98 .SH ´ØÏ¢¹àÌÜ
99 .BR ttyname (3)