fc733ebccd
This section is based on catpages contributed by Mainichi Communications, Inc. Translated by: MYCOM team Converted by: Japanese Online Manual Project <man-jp@jp.FreeBSD.ORG> Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp>
238 lines
5.9 KiB
Groff
238 lines
5.9 KiB
Groff
.\" Copyright (c) 1989, 1991, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)getttyent.3 8.1 (Berkeley) 6/4/93
|
|
.\"
|
|
.Dd November 17, 1996
|
|
.Dt GETTTYENT 3
|
|
.Os BSD 4.3
|
|
.Sh ̾¾Î
|
|
.Nm getttyent ,
|
|
.Nm getttynam ,
|
|
.Nm setttyent ,
|
|
.Nm endttyent
|
|
.Nd ttys ¥Õ¥¡¥¤¥ë¥¨¥ó¥È¥ê¤ò¼èÆÀ
|
|
.Nm isdialuptty ,
|
|
.Nm isnettty
|
|
.Nd ¥Õ¥¡¥¤¥ë¥¨¥ó¥È¥ê¤«¤é tty ¥¿¥¤¥×¤ò·è¤á¤ë
|
|
.Sh ½ñ¼°
|
|
.Fd #include <ttyent.h>
|
|
.Ft struct ttyent *
|
|
.Fn getttyent void
|
|
.Ft struct ttyent *
|
|
.Fn getttynam "const char *name"
|
|
.Ft int
|
|
.Fn setttyent void
|
|
.Ft int
|
|
.Fn endttyent void
|
|
.Ft int
|
|
.Fn isdialuptty "const char *name"
|
|
.Ft int
|
|
.Fn isnettty "const char *name"
|
|
.Sh ²òÀâ
|
|
.Fn getttyent
|
|
¤ª¤è¤Ó
|
|
.Fn getttynam
|
|
´Ø¿ô¤Ï¤½¤ì¤¾¤ì¡¢¼¡¤Ë¼¨¤¹¹½Â¤ÂΤò»ý¤Ä
|
|
¥ª¥Ö¥¸¥§¥¯¥È¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤·¤Þ¤¹¡£¹½Â¤ÂΤˤϡ¢
|
|
tty
|
|
µ½Ò¥Õ¥¡¥¤¥ë¤Ë¤¢¤ë¹Ô¤Î
|
|
ÆâÌõ¥Õ¥£¡¼¥ë¥É¤¬´Þ¤Þ¤ì¤Þ¤¹¡£
|
|
.Bd -literal
|
|
struct ttyent {
|
|
char *ty_name; /* üËö¥Ç¥Ð¥¤¥¹Ì¾ */
|
|
char *ty_getty; /* ¼Â¹Ô¤¹¤ë¥³¥Þ¥ó¥É¡¢Ä̾ï¤Ï getty */
|
|
char *ty_type; /* termcap ¤ÎüËö¥¿¥¤¥× */
|
|
#define TTY_ON 0x01 /* ¥í¥°¥¤¥ó¤Î͸ú²½ (ty_getty
|
|
¥×¥í¥°¥é¥à¤Î³«»Ï) */
|
|
#define TTY_SECURE 0x02 /* uid 0 ¤Ç¤Î¥í¥°¥¤¥óµö²Ä */
|
|
#define TTY_DIALUP 0x04 /* ¥À¥¤¥¢¥ë¥¢¥Ã¥× tty */
|
|
#define TTY_NETWORK 0x08 /* ¥Í¥Ã¥È¥ï¡¼¥¯ tty */
|
|
int ty_status; /* ¥¹¥Æ¡¼¥¿¥¹¥Õ¥é¥° */
|
|
char *ty_window; /* ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ãµ¯Æ°¥³¥Þ¥ó¥É */
|
|
char *ty_comment; /* ¥³¥á¥ó¥È¥Õ¥£¡¼¥ë¥É */
|
|
char *ty_group; /* tty ¥°¥ë¡¼¥×̾ */
|
|
};
|
|
.Ed
|
|
.Pp
|
|
¥Õ¥£¡¼¥ë¥É¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£
|
|
.Bl -tag -width ty_comment
|
|
.It Fa ty_name
|
|
¥¥ã¥é¥¯¥¿
|
|
-
|
|
Æüì¥Õ¥¡¥¤¥ë̾¡£
|
|
.It Fa ty_getty
|
|
tty
|
|
²óÀþÆÃÀ¤Î½é´ü²½¤Î¤¿¤á¡¢
|
|
.Xr init 8
|
|
¤Ë¤è¤Ã¤Æ¸Æ¤Ó½Ð¤¹
|
|
¥³¥Þ¥ó¥É̾¡£
|
|
.It Fa ty_type
|
|
¤³¤Î
|
|
tty
|
|
²óÀþ¤ËÀܳ¤µ¤ì¤¿¥Ç¥Õ¥©¥ë¥ÈüËö¤Î¥¿¥¤¥×̾¡£
|
|
.It Fa ty_status
|
|
¤³¤Î
|
|
tty
|
|
²óÀþ¤Çµö¤µ¤ì¤ë¤µ¤Þ¤¶¤Þ¤Êµ¡Ç½¤ò¼¨¤¹¡¢
|
|
¥Ó¥Ã¥È¥Õ¥£¡¼¥ë¥É¤Î¥Þ¥¹¥¯¡£
|
|
²Äǽ¤Ê¥Õ¥é¥°¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£
|
|
.Bl -tag -width TTY_NETWORK
|
|
.It Dv TTY_ON
|
|
¥í¥°¥¤¥ó¤ò͸ú²½¤·¤Þ¤¹
|
|
(¤¹¤Ê¤ï¤Á¡¢¤³¤Î¥¨¥ó¥È¥ê¤Î
|
|
.Fa ty_getty
|
|
¤Ç»²¾È¤µ¤ì¤ë¥³¥Þ¥ó¥É¤ò¡¢
|
|
.Xr init 8
|
|
¤¬µ¯Æ°¤·¤Þ¤¹)¡£
|
|
.It Dv TTY_SECURE
|
|
¥æ¡¼¥¶¤Ï uid 0 ¤Ç¤³¤ÎüËö¤Ë¥í¥°¥¤¥ó¤Ç¤¤Þ¤¹¡£
|
|
.It Dv TTY_DIALUP
|
|
¥æ¡¼¥¶¤Ï
|
|
uid 0
|
|
¤Ç¤³¤ÎüËö¤Ë¥í¥°¥¤¥ó¤Ç¤¤Þ¤¹¡£
|
|
.It Dv TTY_DIALUP
|
|
tty
|
|
¤ò¥À¥¤¥¢¥ë¥¤¥ó²óÀþ¤È¤·¤Æ¼±Ê̤·¤Þ¤¹¡£¤³¤Î
|
|
¥Õ¥é¥°¤¬ÀßÄꤵ¤ì¤ë¤È¡¢
|
|
.Fn isdialuptty
|
|
¤ÏÈó¥¼¥íÃͤòÊÖ¤·¤Þ¤¹¡£
|
|
.It Dv TTY_NETWORK
|
|
¥Í¥Ã¥È¥ï¡¼¥¯Àܳ¤Ë»ÈÍѤµ¤ì¤¿
|
|
tty
|
|
¤ò¼±Ê̤·¤Þ¤¹¡£¤³¤Î¥Õ¥é¥°¤¬ÀßÄꤵ¤ì¤ë¤È¡¢
|
|
.Fn isnettty
|
|
¤ÏÈó¥¼¥íÃͤòÊÖ¤·¤Þ¤¹¡£
|
|
.El
|
|
.It Fa ty_window
|
|
²óÀþ¤Ë´ØÏ¢¤¹¤ë¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤ò¼Â¹Ô¤¹¤ë¥³¥Þ¥ó¥É¤Ç¤¹¡£
|
|
.It Fa ty_group
|
|
ttys
|
|
¤¬½ê°¤¹¤ë¥°¥ë¡¼¥×̾¤Ç¤¹¡£
|
|
ttys
|
|
µ½Ò¥Õ¥¡¥¤¥ë¤Ë¥°¥ë¡¼¥×¤Î»ØÄ꤬¤Ê¤¤¾ì¹ç¤Ï¡¢
|
|
"none"
|
|
¤È¸Æ¤Ð¤ì¤ë̵̾¥°¥ë¡¼¥×¤Ë¤½¤Î
|
|
tty
|
|
¤¬ÃÖ¤«¤ì¤Þ¤¹¡£
|
|
.It Fa ty_comment
|
|
ÀèƬ¤Ë¥·¥ã¡¼¥×
|
|
(``#'')
|
|
¤¬ÉÕ¤¯¤«¤Þ¤¿¤Ï;Çò¤¬¤¢¤ë¡¢½ªÃ¼¤Î
|
|
¥³¥á¥ó¥È¥Õ¥£¡¼¥ë¥É¤Ï¤¹¤Ù¤Æ½üµî¤µ¤ì¤Þ¤¹¡£
|
|
.El
|
|
.Pp
|
|
¥¥ã¥é¥¯¥¿¥¹¥È¥ê¥ó¥°¤ò¼¨¤¹¥Õ¥£¡¼¥ë¥É¤¬Ì¤»ØÄê¤Î¾ì¹ç¡¢¤½¤ì¤é¤Ï¤¹¤Ù¤Æ
|
|
null
|
|
¥Ý¥¤¥ó¥¿¤È¤·¤ÆÊÖ¤ê¤Þ¤¹¡£»ØÄꤵ¤ì¤¿¥Õ¥é¥°Ãͤ¬¤Ê¤¤¾ì¹ç¡¢¥Õ¥£¡¼¥ë¥É
|
|
.Fa ty_status
|
|
¤Ï¥¼¥í¤Ë¤Ê¤ê¤Þ¤¹¡£
|
|
.Pp
|
|
¤³¤Î¥Õ¥£¡¼¥ë¥É¤Î°ÕÌ£¤ª¤è¤ÓÍÑË¡¤Î¾ÜºÙ¤ÊÀâÌÀ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
|
|
.Xr ttys 5
|
|
¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
|
|
.Pp
|
|
.Fn getttyent
|
|
´Ø¿ô¤Ï¡¢É¬Íפʤé¤Ð¥ª¡¼¥×¥ó¤·¤Æ
|
|
ttys
|
|
¥Õ¥¡¥¤¥ë¤Î¼¡¤Î¹Ô¤òÆɤ߹þ¤ß¤Þ¤¹¡£
|
|
.Fn setttyent
|
|
´Ø¿ô¤Ï¡¢¥Õ¥¡¥¤¥ë¤¬¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ì¤Ð¥ê¥ï¥¤¥ó¥É¤·¡¢
|
|
¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¥ª¡¼¥×¥ó¤·¤Þ¤¹¡£
|
|
.Fn endttyent
|
|
´Ø¿ô¤Ï¡¢¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤ò¤¹¤Ù¤Æ¥¯¥í¡¼¥º¤·¤Þ¤¹¡£
|
|
.Pp
|
|
.Fn getttynam
|
|
´Ø¿ô¤Ï¡¢Å¬¹ç¤¹¤ë
|
|
.Fa name
|
|
¤¬¸«ÉÕ¤«¤ë
|
|
(¤«¤Þ¤¿¤Ï
|
|
.Dv EOF
|
|
¤Ë½Ð²ñ¤¦)
|
|
¤Þ¤Ç¡¢¥Õ¥¡¥¤¥ë¤òºÇ½é¤«¤é¸¡º÷¤·¤Þ¤¹¡£
|
|
.Sh Ìá¤êÃÍ
|
|
¥ë¡¼¥Á¥ó
|
|
.Fn getttyent
|
|
¤ª¤è¤Ó
|
|
.Fn getttynam
|
|
¤Ï¡¢
|
|
.Dv EOF
|
|
¤Þ¤¿¤Ï¥¨¥é¡¼¤Ç¤¤¤º¤ì¤â
|
|
Null
|
|
¥Ý¥¤¥ó¥¿¤òÊÖ¤·¤Þ¤¹¡£
|
|
.Fn setttyent
|
|
´Ø¿ô¤ª¤è¤Ó
|
|
.Fn endttyent
|
|
´Ø¿ô¤Ï¡¢¤¤¤º¤ì¤â¼ºÇÔ¤·¤¿¾ì¹ç¤Ï
|
|
0 ¤ò¡¢À®¸ù¤·¤¿¾ì¹ç¤Ï
|
|
1 ¤òÊÖ¤·¤Þ¤¹¡£
|
|
.Pp
|
|
¥ë¡¼¥Á¥ó
|
|
.Fn isdialuptty
|
|
¤ª¤è¤Ó
|
|
.Fn isnettty
|
|
¤Ï¡¢¥Ñ¥é¥á¡¼¥¿¤Ë¤è¤Ã¤Æ»Ø̾¤µ¤ì¤¿
|
|
tty
|
|
¤Ë´ØÏ¢¤¹¤ë
|
|
tty
|
|
¥¨¥ó¥È¥ê¤Ë¡¢¥À¥¤¥¢¥ë¥¢¥Ã¥×¤Þ¤¿¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¥Õ¥é¥°¤¬
|
|
ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤ÐÈó¥¼¥í¤òÊÖ¤·¡¢¤½¤Î¾¤Î¾ì¹ç¤Ï¥¼¥í¤òÊÖ¤·¤Þ¤¹¡£
|
|
.Sh ´ØÏ¢¥Õ¥¡¥¤¥ë
|
|
.Bl -tag -width /etc/ttys -compact
|
|
.It Pa /etc/ttys
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr login 1
|
|
¡¢
|
|
.Xr ttyslot 3
|
|
¡¢
|
|
.Xr gettytab 5
|
|
¡¢
|
|
.Xr termcap 5
|
|
¡¢
|
|
.Xr ttys 5
|
|
¡¢
|
|
.Xr getty 8 ,
|
|
.Xr init 8
|
|
.Sh Îò»Ë
|
|
.Fn getttyent
|
|
¡¢
|
|
.Fn getttynam
|
|
¡¢
|
|
.Fn setttyent
|
|
¤ª¤è¤Ó
|
|
.Fn endttyent
|
|
´Ø¿ô¤Ï¡¢
|
|
.Bx 4.3
|
|
¤ÇºÇ½é¤Ë¼è¤êÆþ¤ì¤é¤ì¤Þ¤·¤¿¡£
|
|
.Sh ¥Ð¥°
|
|
¤³¤ì¤é¤Î´Ø¿ô¤ÏÀÅŪ¥Ç¡¼¥¿µ²±°è¤ò»ÈÍѤ·¤Þ¤¹¡£¸å¤Ç»ÈÍѤ¹¤ë¥Ç¡¼¥¿¤Î¾ì¹ç¤Ï¡¢
|
|
°Ê¸å¤Î¸Æ¤Ó½Ð¤·¤Ç¾å½ñ¤¤¹¤ëÁ°¤Ë¥Ç¡¼¥¿¤ò¥³¥Ô¡¼¤·¤ÆÊݸ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
|