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 .\" This replaces an earlier man page written by Walter Harms
24 .\" <walter.harms@informatik.uni-oldenburg.de>.
26 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
27 .\" all rights reserved.
28 .\" Translated Wed Sep 8 01:25:01 JST 2004
29 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
31 .TH TTYSLOT 3 2007-11-26 "GNU" "Linux Programmer's Manual"
33 ttyslot \- ¥«¥ì¥ó¥È¥æ¡¼¥¶¤ÎüËö¤Î¥¹¥í¥Ã¥È¤ò¥Õ¥¡¥¤¥ë¤«¤éõ¤¹
35 .BR "#include <unistd.h>" " /* BSD ·Ï¤Î¥·¥¹¥Æ¥à¤È Linux ¤Î¾ì¹ç */"
37 .BR "#include <stdlib.h>" " /* System V ·Ï¤Î¥·¥¹¥Æ¥à¤Î¾ì¹ç */"
39 .B "int ttyslot(void);"
42 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
43 .RB ( feature_test_macros (7)
49 _BSD_SOURCE || (_XOPEN_SOURCE_EXTENDED && !\ _XOPEN_SOURCE\ >=\ 500)
54 ¤Ï¡¢¤¢¤ë¥Õ¥¡¥¤¥ë¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¥«¥ì¥ó¥È¥æ¡¼¥¶¤Î¥¨¥ó¥È¥ê¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤òÊÖ¤¹¡£
56 ¡Ö¤É¤Î¥Õ¥¡¥¤¥ë¤Ê¤Î¤«¡©¡×¤È¤¤¤¦¼ÁÌ䤬¤¢¤ë¤À¤í¤¦¡£
57 ¤Ç¤Ï¡¢¤Þ¤ººÇ½é¤Ë¤½¤ÎÎò»Ë¤ò¸«¤Æ¤ß¤è¤¦¡£
61 ¥Õ¥¡¥¤¥ë¤¬»È¤ï¤ì¤Æ¤¤¤¿¡£
63 ¥×¥í¥°¥é¥à¤Ï¡¢¤³¤Î¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤ß¡¢
64 ³ÆüËö¹Ô¤Ç²¿¤ò¤¹¤Ù¤¤«¤òõ¤¹¡£
65 ³Æ¹Ô¤Ï 3 ʸ»ú¤«¤é¹½À®¤µ¤ì¤Æ¤¤¤ë¡£
66 1 ʸ»úÌÜ¤Ï \(aq0\(aq ¤Þ¤¿¤Ï \(aq1\(aq ¤Ç¤¢¤ê¡¢
67 \(aq0\(aq ¤Ï¡Ö̵»ë¤¹¤ë¡×¤³¤È¤òɽ¤¹¡£
68 2 ʸ»úÌܤÏüËö¤ò¼¨¤¹: \(aq8\(aq ¤Ï "/dev/tty8" ¤òɽ¤¹¡£
71 ¤Ø¤Î°ú¤¿ô¤Ç¤¢¤ê¡¢(Àܳ¤ò) »î¤ß¤ë²óÀþ®Å٤νç½ø¤òɽ¤¹
72 (\(aq\-\(aq ¤Ï 110 ¥Ü¡¼¤ÇÀܳ¤Î»î¹Ô¤ò³«»Ï¤¹¤ë¤³¤È¤òɽ¤¹)¡£
73 ¤è¤Ã¤Æ°ìÈÌŪ¤Ê¹Ô¤Ï "18\-" ¤È¤Ê¤ë¡£
74 ¤¢¤ë¹Ô¤Ç¥Ï¥ó¥°¤·¤¿¾ì¹ç¤Ï¡¢\(aq1\(aq ¤ò \(aq0\(aq ¤ËÊѹ¹¤·¡¢
75 init ¤Ë¥·¥°¥Ê¥ë¤òÁ÷¤ê¡¢\(aq0\(aq ¤ò \(aq1\(aq ºÆÅÙ¤ËÊѹ¹¤·¡¢
76 init ¤ËºÆÅÙ¥·¥°¥Ê¥ë¤òÁ÷¤ë¤³¤È¤Ç²ò·è¤¹¤ë¡£
78 Unix V7 ¤Ç¤Ï¥Õ¥©¡¼¥Þ¥Ã¥È¤¬Êѹ¹¤µ¤ì¤¿:
81 ¤Î°ú¤¿ô¤È¤Ê¤ê¡¢(Àܳ¤ò) »î¤ß¤ë²óÀþ®Å٤νç½ø¤òɽ¤¹¤è¤¦¤Ë¤Ê¤ê
82 (\(aq0\(aq ¤Ï 300-1200-150-110 ¤ò·«¤êÊÖ¤¹¤³¤È¤òɽ¤·¡¢
83 \(aq4\(aq ¤Ï¥ª¥ó¥é¥¤¥ó¥³¥ó¥½¡¼¥ë DECwriter ¤òɽ¤¹)¡¢
84 ¹Ô¤Î»Ä¤ê (¤Îʸ»ú) ¤ÏüËö̾¤È¤Ê¤Ã¤¿¡£
85 ¤è¤Ã¤Æ¡¢°ìÈÌŪ¤Ê¹Ô¤Ï "14console" ¤È¤Ê¤ë¡£
87 ¸å¼Ô¤Î¥·¥¹¥Æ¥à¤Î½ñ¼°¤Ï¡¢¤è¤êÀº¹ª¤Ç¤¢¤ë¡£
88 System V ·Ï¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢Âå¤ï¤ê¤Ë
92 °ìÊý¡¢¸½ºß¥í¥°¥¤¥ó¤·¤Æ¤¤¤ë¿Í¤ò¥ê¥¹¥È¤¹¤ë¥Õ¥¡¥¤¥ë
97 ¤Ë¤è¤Ã¤Æ´ÉÍý¤µ¤ì¤Æ¤¤¤ë¡£
98 ¤³¤Î¥Õ¥¡¥¤¥ë¤Ï¸ÇÄꤵ¤ì¤¿¥µ¥¤¥º¤Ç¤¢¤ê¡¢¥Õ¥¡¥¤¥ëÆâ¤ÎŬÀڤʥ¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢
105 ¤Ë¤ª¤±¤ë¹ÔÈÖ¹æ¤ò¸«¤Ä¤±¤ë (¹ÔÈÖ¹æ¤Ï 1 ¤«¤é¿ô¤¨¤ë)¡£
111 ¤Ë¤ª¤±¤ë¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤òÊÖ¤¹¡£
114 ¤Ë¤ª¤±¤ë¥«¥ì¥ó¥È¥æ¡¼¥¶¤Î¥¨¥ó¥È¥ê¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤È (Ä̾ï¤Ï) Åù¤·¤¤¡£
117 ¥Õ¥¡¥¤¥ë¤¬¤¢¤ë¤¬¡¢System V ·Ï¤Î¥·¥¹¥Æ¥à¤Ë¤Ï¤Ê¤¤¤Î¤Ç¡¢
118 ¤³¤Î¥Õ¥¡¥¤¥ë¤ò»²¾È¤¹¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤¡£
119 ¤è¤Ã¤Æ¡¢¤½¤Î¤è¤¦¤Ê¥·¥¹¥Æ¥à¤Ç¤Ï
121 ¤Ï¥«¥ì¥ó¥È¥æ¡¼¥¶¤Î¥æ¡¼¥¶¥¢¥«¥¦¥ó¥È¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤ª¤±¤ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤òÊÖ¤¹¡×
122 ¤È¥É¥¥å¥á¥ó¥È¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¡£
124 À®¸ù¤·¤¿¾ì¹ç¡¢¤³¤Î´Ø¿ô¤Ï¥¹¥í¥Ã¥ÈÈÖ¹æ¤òÊÖ¤¹¡£
126 (Î㤨¤Ð¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿ 0, 1, 2 ¤Î²¿¤ì¤â
127 ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤¢¤ëüËö¤Ë´ØÏ¢¤Å¤±¤é¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç)¡¢
128 Unix V6, V7, BSD ·Ï¤Î¥·¥¹¥Æ¥à¤Ï 0 ¤òÊÖ¤¹¤¬¡¢
129 System V ·Ï¤Î¥·¥¹¥Æ¥à¤Ï -1 ¤òÊÖ¤¹¡£
131 SUSv1¡£SUSv2 ¤Ç¤Ï¡Ö²áµî¤Î̾»Ä (LEGACY)¡×¤È°ÌÃÖÉÕ¤±¤é¤ì¤Æ¤¤¤ë¡£
132 POSIX.1-2001 ¤Çºï½ü¤µ¤ì¤¿¡£
133 SUSv2 ¤Ç¤Ï¥¨¥é¡¼»þ¤Ë \-1 ¤òÊÖ¤¹¤³¤È¤¬Í׵ᤵ¤ì¤Æ¤¤¤ë¡£
135 utmp ¥Õ¥¡¥¤¥ë¤ÏÍÍ¡¹¤Ê¥·¥¹¥Æ¥à¤Ç
139 ¤Î¤è¤¦¤Ë¤¤¤í¤¤¤í¤Ê¾ì½ê¤Ë¤¢¤ë¡£
141 ¤³¤Î´Ø¿ô¤Î glibc2 ¤Ë¤ª¤±¤ë¼ÂÁõ¤Ç¤Ï¡¢¥Õ¥¡¥¤¥ë
146 ¤Ë¤ª¤¤¤Æ "/etc/ttys" ¤ÈÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
147 ¥¨¥é¡¼¤Î¾ì¹ç¡¢0 ¤òÊÖ¤¹¡£
148 Linux ¥·¥¹¥Æ¥à¤Ë¤ÏÄ̾ï "/etc/ttys" ¤¬¤Ê¤¤¤Î¤Ç¡¢¾ï¤Ë 0 ¤òÊÖ¤¹¡£
155 .\" ¤Ï Unix V7 ¤ËÅо줷¤¿¡£