OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man4 / tty_ioctl.4
index af59ed3..505168d 100644 (file)
 .\" Copyright 2002 Walter Harms <walter.harms@informatik.uni-oldenburg.de>
 .\" and Andries Brouwer <aeb@cwi.nl>.
-.\" Distributed under GPL.
 .\"
-.\" Japanese Version Copyright (c) 2004 Yuichi SATO
-.\"         all rights reserved.
-.\" Translated Sat Oct 16 06:08:24 JST 2004
-.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
 .\"
-.TH TTY_IOCTL 4 2008-10-29 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O tty_ioctl \- ioctls for terminals and serial lines
-tty_ioctl \- Ã¼Ëö¤È¥·¥ê¥¢¥ë¥é¥¤¥ó¤Î ioctl (Æþ½ÐÎÏÀ©¸æ)
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
-.B "#include <termios.h>"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH TTY_IOCTL 4 2008\-10\-29 Linux "Linux Programmer's Manual"
+.SH 名前
+tty_ioctl \- 端末とシリアルラインの ioctl (入出力制御)
+.SH 書式
+\fB#include <termios.h>\fP
 .sp
-.BI "int ioctl(int " fd ", int " cmd ", ...);"
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The
-.\"O .BR ioctl (2)
-.\"O call for terminals and serial ports accepts many possible command arguments.
-üËö¤È¥·¥ê¥¢¥ë¥Ý¡¼¥È¤Ë¤Ä¤¤¤Æ¤Î
-.BR ioctl (2)
-¥³¡¼¥ë¤Ï¡¢Â¿¤¯¤Î¥³¥Þ¥ó¥É°ú¤­¿ô¤ò¼õ¤±ÉÕ¤±¤ë¡£
-.\"O Most require a third argument, of varying type, here called \fIargp\fP
-.\"O or \fIarg\fP.
-¿¤¯¤¬¤¤¤í¤¤¤í¤Ê·¿¤Î 3 ÈÖÌܤΰú¤­¿ô¤òɬÍפȤ¹¤ë¡£
-¤³¤³¤Ç¤Ï \fIargp\fP ¤Þ¤¿¤Ï \fIarg\fP ¤È¸Æ¤Ö¡£
+\fBint ioctl(int \fP\fIfd\fP\fB, int \fP\fIcmd\fP\fB, ...);\fP
+.SH 説明
+端末とシリアルポートについての \fBioctl\fP(2)  コールは、多くのコマンド引き数を受け付ける。 多くがいろいろな型の 3
+番目の引き数を必要とする。 ここでは \fIargp\fP または \fIarg\fP と呼ぶ。
 .LP
-.\"O Use of
-.\"O .I ioctl
-.\"O makes for nonportable programs.
-.\"O Use the POSIX interface described in
-.\"O .BR termios (3)
-.\"O whenever possible.
-.I ioctl
-¤ò»ÈÍѤ¹¤ë¤È°Ü¿¢À­¤Î¤Ê¤¤¥×¥í¥°¥é¥à¤Ë¤Ê¤ë¡£
-²Äǽ¤Ê¾ì¹ç¤Ï¡¢
-.BR termios (3)
-¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ë POSIX ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò»È¤¦¤³¤È¡£
-.\"O .SS "Get and Set Terminal Attributes"
-.SS Ã¼Ëö°À­¤Î¼èÆÀ¤ÈÀßÄê
-.TP
-.BI "TCGETS    struct termios *" argp
-.\"O Equivalent to
-.\"O .IR "tcgetattr(fd, argp)" .
-.I "tcgetattr(fd, argp)"
-¤ÈƱ¤¸¡£
+\fIioctl\fP を使用すると移植性のないプログラムになる。 可能な場合は、 \fBtermios\fP(3)  に記述されている POSIX
+インタフェースを使うこと。
+.SS 端末属性の取得と設定
+.TP 
+\fBTCGETS      struct termios *\fP\fIargp\fP
+\fItcgetattr(fd, argp)\fP と同じ。
 .br
-.\"O Get the current serial port settings.
-¸½ºß¤Î¥·¥ê¥¢¥ë¥Ý¡¼¥È¤ÎÀßÄê¤ò¼èÆÀ¤¹¤ë¡£
-.TP
-.BI "TCSETS    const struct termios *" argp
-.\"O Equivalent to
-.\"O .IR "tcsetattr(fd, TCSANOW, argp)" .
-.I "tcsetattr(fd, TCSANOW, argp)"
-¤ÈƱ¤¸¡£
+現在のシリアルポートの設定を取得する。
+.TP 
+\fBTCSETS      const struct termios *\fP\fIargp\fP
+\fItcsetattr(fd, TCSANOW, argp)\fP と同じ。
 .br
-.\"O Set the current serial port settings.
-¸½ºß¤Î¥·¥ê¥¢¥ë¥Ý¡¼¥È¤ÎÀßÄê¤òÊѹ¹¤¹¤ë¡£
-.TP
-.BI "TCSETSW   const struct termios *" argp
-.\"O Equivalent to
-.\"O .IR "tcsetattr(fd, TCSADRAIN, argp)" .
-.I "tcsetattr(fd, TCSADRAIN, argp)"
-¤ÈƱ¤¸¡£
+現在のシリアルポートの設定を変更する。
+.TP 
+\fBTCSETSW     const struct termios *\fP\fIargp\fP
+\fItcsetattr(fd, TCSADRAIN, argp)\fP と同じ。
 .br
-.\"O Allow the output buffer to drain, and
-.\"O set the current serial port settings.
-ÇӽР(drain) ¤ò¹Ô¤¦¤¿¤á¤Î½ÐÎϥХåե¡¤Î»ÈÍѤòµö²Ä¤·¡¢
-¸½ºß¤Î¥·¥ê¥¢¥ë¥Ý¡¼¥È¤ÎÀßÄê¤òÊѹ¹¤¹¤ë¡£
-.TP
-.BI "TCSETSF   const struct termios *" argp
-.\"O Equivalent to
-.\"O .IR "tcsetattr(fd, TCSAFLUSH, argp)" .
-.I "tcsetattr(fd, TCSAFLUSH, argp)"
-¤ÈƱ¤¸¡£
+排出 (drain) を行うための出力バッファの使用を許可し、 現在のシリアルポートの設定を変更する。
+.TP 
+\fBTCSETSF     const struct termios *\fP\fIargp\fP
+\fItcsetattr(fd, TCSAFLUSH, argp)\fP と同じ。
 .br
-.\"O Allow the output buffer to drain, discard pending input, and
-.\"O set the current serial port settings.
-ÇӽР(drain) ¤ò¹Ô¤¦¤¿¤á¤Î½ÐÎϥХåե¡¤Î»ÈÍѤòµö²Ä¤·¡¢
-½èÍý¤·¤Æ¤¤¤Ê¤¤ÆþÎϤòÇË´þ¤·¤Æ¡¢
-¸½ºß¤Î¥·¥ê¥¢¥ë¥Ý¡¼¥È¤ÎÀßÄê¤òÊѹ¹¤¹¤ë¡£
+排出 (drain) を行うための出力バッファの使用を許可し、 処理していない入力を破棄して、 現在のシリアルポートの設定を変更する。
 .LP
-.\"O The following four ioctls are just like
-.\"O .BR TCGETS ,
-.\"O .BR TCSETS ,
-.\"O .BR TCSETSW ,
-.\"O .BR TCSETSF ,
-.\"O except that they take a
-.\"O .I "struct termio *"
-.\"O instead of a
-.\"O .IR "struct termios *" .
-°Ê²¼¤Î 4 ¤Ä¤Î ioctl ¤Ï
-.BR TCGETS ,
-.BR TCSETS ,
-.BR TCSETSW ,
-.B TCSETSF
-¤È»÷¤Æ¤¤¤ë¡£
-¤¿¤À¤·¡¢
-.I "struct termios *"
-¤ÎÂå¤ï¤ê¤Ë
-.I "struct termio *"
-¤ò¼è¤ë¡£
-.TP
-.BI "TCGETA    struct termio *" argp
-.TP
-.BI "TCSETA    const struct termio *" argp
-.TP
-.BI "TCSETAW   const struct termio *" argp
-.TP
-.BI "TCSETAF   const struct termio *" argp
-.\"O .SS "Locking the termios structure"
-.SS "termios ¹½Â¤ÂΤΥí¥Ã¥¯"
-.\"O The
-.\"O .I termios
-.\"O structure of a terminal can be locked.
-.\"O The lock is itself a
-.\"O .I termios
-.\"O structure, with nonzero bits or fields indicating a
-.\"O locked value.
-üËö¤Î
-.I termios
-¹½Â¤ÂΤϥí¥Ã¥¯¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¢¤ë¡£
-¤³¤Î¥í¥Ã¥¯¼«ÂΤÏ
-.I termios
-¹½Â¤ÂΤǤ¢¤ê¡¢
-0 ¤Ç¤Ê¤¤¥Ó¥Ã¥È¤Þ¤¿¤Ï¥Õ¥£¡¼¥ë¥É¤Ï¥í¥Ã¥¯¤µ¤ì¤¿Ãͤò¼¨¤¹¡£
-.TP
-.BI "TIOCGLCKTRMIOS    struct termios *" argp
-.\"O Gets the locking status of the
-.\"O .I termios
-.\"O structure of the terminal.
-üËö¤Î
-.I termios
-¹½Â¤ÂΤΥí¥Ã¥¯¾õÂÖ¤ò¼èÆÀ¤¹¤ë¡£
-.TP
-.BI "TIOCSLCKTRMIOS    const struct termios *" argp
-.\"O Sets the locking status of the
-.\"O .I termios
-.\"O structure of the terminal.
-.\"O Only root (more precisely: a process with the
-.\"O .BR CAP_SYS_ADMIN
-.\"O capability) can do this.
-üËö¤Î
-.I termios
-¹½Â¤ÂΤΥí¥Ã¥¯¾õÂÖ¤òÀßÄꤹ¤ë¡£
-root ¤Î¤ß (¤è¤êÀµ³Î¤Ë¤Ï¡¢
-.B CAP_SYS_ADMIN
-¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ò»ý¤Ä¥×¥í¥»¥¹) ¤¬¤³¤ì¤ò¼Â¹Ô¤Ç¤­¤ë¡£
-.\"O .SS "Get and Set Window Size"
-.SS ¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤Î¼èÆÀ¤ÈÀßÄê
-.\"O Window sizes are kept in the kernel, but not used by the kernel
-.\"O (except in the case of virtual consoles, where the kernel will
-.\"O update the window size when the size of the virtual console changes,
-.\"O for example, by loading a new font).
-¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤Ï¥«¡¼¥Í¥ëÆâ¤ËÊÝ»ý¤µ¤ì¤ë¤¬¡¢
-¥«¡¼¥Í¥ë¤Ë¤è¤Ã¤Æ»ÈÍѤµ¤ì¤Ê¤¤
-(²¾ÁÛ¥³¥ó¥½¡¼¥ë¤Î¾ì¹ç¤ÏÎã³°¤Ç¤¢¤ê¡¢¿·¤·¤¤¥Õ¥©¥ó¥È¤òÆɤ߹þ¤ó¤À¾ì¹ç¤Ê¤É¡¢
-²¾ÁÛüËö¤Î¥µ¥¤¥º¤¬Êѹ¹¤µ¤ì¤¿¾ì¹ç¡¢¥«¡¼¥Í¥ë¤Ï¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤ò¹¹¿·¤¹¤ë)¡£
+以下の 4 つの ioctl は \fBTCGETS\fP, \fBTCSETS\fP, \fBTCSETSW\fP, \fBTCSETSF\fP と似ている。 ただし、
+\fIstruct termios\ *\fP の代わりに \fIstruct termio\ *\fP を取る。
+.IP
+\fBTCGETA      struct termio *\fP\fIargp\fP
+.IP
+\fBTCSETA      const struct termio *\fP\fIargp\fP
+.IP
+\fBTCSETAW     const struct termio *\fP\fIargp\fP
+.IP
+\fBTCSETAF     const struct termio *\fP\fIargp\fP
+.SS "termios 構造体のロック"
+端末の \fItermios\fP 構造体はロックすることが可能である。 このロック自体は \fItermios\fP 構造体であり、 0
+でないビットまたはフィールドはロックされた値を示す。
+.TP 
+\fBTIOCGLCKTRMIOS      struct termios *\fP\fIargp\fP
+端末の \fItermios\fP 構造体のロック状態を取得する。
+.TP 
+\fBTIOCSLCKTRMIOS      const struct termios *\fP\fIargp\fP
+端末の \fItermios\fP 構造体のロック状態を設定する。 root のみ (より正確には、 \fBCAP_SYS_ADMIN\fP
+ケーパビリティを持つプロセス) がこれを実行できる。
+.SS ウィンドウサイズの取得と設定
+ウィンドウサイズはカーネル内に保持されるが、 カーネルによって使用されない (仮想コンソールの場合は例外であり、新しいフォントを読み込んだ場合など、
+仮想端末のサイズが変更された場合、カーネルはウィンドウサイズを更新する)。
 
-.\"O The following constants and structure are defined in
-.\"O .IR <sys/ioctl.h> .
-°Ê²¼¤ÎÄê¿ô¤È¹½Â¤ÂΤÏ
-.I <sys/ioctl.h>
-¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
-.TP
-.BI "TIOCGWINSZ        struct winsize *" argp
-.\"O Get window size.
-¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤ò¼èÆÀ¤¹¤ë¡£
-.TP
-.BI "TIOCSWINSZ        const struct winsize *" argp
-.\"O Set window size.
-¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤òÀßÄꤹ¤ë¡£
+以下の定数と構造体は \fI<sys/ioctl.h>\fP で定義されている。
+.TP 
+\fBTIOCGWINSZ  struct winsize *\fP\fIargp\fP
+ウィンドウサイズを取得する。
+.TP 
+\fBTIOCSWINSZ  const struct winsize *\fP\fIargp\fP
+ウィンドウサイズを設定する。
 .LP
-.\"O The struct used by these ioctls is defined as
-¤³¤ì¤é¤Î ioctl ¤Ç»ÈÍѤµ¤ì¤ë¹½Â¤ÂΤϡ¢°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤ë¡£
+これらの ioctl で使用される構造体は、以下のように定義される。
 
 .in +4n
 .nf
 struct winsize {
     unsigned short ws_row;
     unsigned short ws_col;
-.\"O     unsigned short ws_xpixel;   /* unused */
-.\"O     unsigned short ws_ypixel;   /* unused */
-    unsigned short ws_xpixel;   /* Ì¤»ÈÍÑ */
-    unsigned short ws_ypixel;   /* Ì¤»ÈÍÑ */
+    unsigned short ws_xpixel;   /* 未使用 */
+    unsigned short ws_ypixel;   /* 未使用 */
 };
 .fi
 .in
 
-.\"O When the window size changes, a
-.\"O .B SIGWINCH
-.\"O signal is sent to the
-.\"O foreground process group.
-¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤¬Êѹ¹¤µ¤ì¤¿¾ì¹ç¡¢
-¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¥°¥ë¡¼¥×¤Ë
-.B SIGWINCH
-¥·¥°¥Ê¥ë¤¬Á÷¤é¤ì¤ë¡£
-.\"O .SS "Sending a Break"
-.SS "break ¤ÎÁ÷¿®"
-.TP
-.BI "TCSBRK    int " arg
-.\"O Equivalent to
-.\"O .IR "tcsendbreak(fd, arg)" .
-.I "tcsendbreak(fd, arg)"
-¤ÈƱ¤¸¡£
+ウィンドウサイズが変更された場合、 フォアグラウンドプロセスグループに \fBSIGWINCH\fP シグナルが送られる。
+.SS "break の送信"
+.TP 
+\fBTCSBRK      int \fP\fIarg\fP
+\fItcsendbreak(fd, arg)\fP と同じ。
 .br
-.\"O If the terminal is using asynchronous serial data transmission, and
-.\"O .I arg
-.\"O is zero, then send a break (a stream of zero bits) for between
-.\"O 0.25 and 0.5 seconds.
-.\"O If the terminal is not using asynchronous
-.\"O serial data transmission, then either a break is sent, or the function
-.\"O returns without doing anything.
-üËö¤¬ÈóƱ´ü¥·¥ê¥¢¥ë¥Ç¡¼¥¿Å¾Á÷¤ò»ÈÍѤ·¤Æ¤ª¤ê¡¢
-.I arg
-¤¬ 0 ¤Î¾ì¹ç¡¢0.25 ¤«¤é 0.5 Éäδ֤Ë
-break (0 ¤Î¥Ó¥Ã¥ÈÎó¤Î¥¹¥È¥ê¡¼¥à) ¤¬Á÷¿®¤µ¤ì¤ë¡£
-üËö¤¬ÈóƱ´ü¥·¥ê¥¢¥ë¥Ç¡¼¥¿Å¾Á÷¤ò»ÈÍѤ·¤Æ¤¤¤ë¾ì¹ç¡¢
-break ¤¬Á÷¿®¤µ¤ì¤ë¤«¡¢¤³¤Î´Ø¿ô¤Ï²¿¤â¤»¤º¤ËÊ֤롣
-.\"O When
-.\"O .I arg
-.\"O is nonzero, nobody knows what will happen.
-.I arg
-¤¬ 0 °Ê³°¤Î¾ì¹ç¡¢²¿¤¬µ¯¤³¤ë¤«Ê¬¤«¤é¤Ê¤¤¡£
+端末が非同期シリアルデータ転送を使用しており、 \fIarg\fP が 0 の場合、0.25 から 0.5 秒の間に break (0
+のビット列のストリーム) が送信される。 端末が非同期シリアルデータ転送を使用している場合、 break が送信されるか、この関数は何もせずに返る。
+\fIarg\fP が 0 以外の場合、何が起こるか分からない。
 
-.\"O (SVr4, UnixWare, Solaris, Linux treat
-.\"O .I "tcsendbreak(fd,arg)"
-.\"O with nonzero
-.\"O .I arg
-.\"O like
-.\"O .IR "tcdrain(fd)" .
-(SVr4, UnixWare, Solaris, Linux ¤Ï¡¢
-.I "tcsendbreak(fd,arg)"
-¤Î
-.I arg
-¤¬ 0 °Ê³°¤Î¾ì¹ç¡¢
-.I "tcdrain(fd)"
-¤Î¤è¤¦¤Ë°·¤¦¡£
-.\"O SunOS treats
-.\"O .I arg
-.\"O as a multiplier, and sends a stream of bits
-.\"O .I arg
-.\"O times as long as done for zero
-.\"O .IR arg .
-SunOS ¤Ï
-.I arg
-¤òÇÜ¿ô¤È¤·¤Æ°·¤¤¡¢¥Ó¥Ã¥È¤Î¥¹¥È¥ê¡¼¥à¤ò
-.I arg
-²óÁ÷¿®¤¹¤ë¡£
-.I arg
-¤¬ 0 ¤Î¾ì¹ç¤âƱ¤¸¡£
-.\"O DG/UX and AIX treat
-.\"O .I arg
-.\"O (when nonzero) as a time interval measured in milliseconds.
-DG/UX ¤È AIX ¤Ï¡¢(0 °Ê³°¤Î¾ì¹ç)
-.I arg
-¤ò¥ß¥êÉÃñ°Ì¤Î»þ´Ö´Ö³Ö¤È¤·¤Æ°·¤¦¡£
-.\"O HP-UX ignores
-.\"O .IR arg .)
-HP-UX ¤Ï
-.I arg
-¤ò̵»ë¤¹¤ë¡£)
-.TP
-.BI "TCSBRKP   int " arg
-.\"O So-called "POSIX version" of
-.\"O .BR TCSBRK .
-.\"O It treats nonzero
-.\"O .I arg
-.\"O as a timeinterval measured in deciseconds, and does nothing
-.\"O when the driver does not support breaks.
-¤¤¤ï¤æ¤ë¡ÖPOSIX ÈǡפÎ
-.B TCSBRK
-¤Ç¤¢¤ë¡£
-¤³¤ì¤Ï 0 °Ê³°¤Î
-.I arg
-¤ò 1/10 ÉÃñ°Ì¤Î»þ´Ö´Ö³Ö¤È¤·¤Æ°·¤¦¡£
-¤Þ¤¿¥É¥é¥¤¥Ð¤¬ break ¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢²¿¤â¤·¤Ê¤¤¡£
-.TP
-.B "TIOCSBRK   void"
-.\"O Turn break on, that is, start sending zero bits.
-break ¤ò¥ª¥ó¤Ë¤¹¤ë¡£
-¤Ä¤Þ¤ê 0 ¤Î¥Ó¥Ã¥ÈÎó¤ÎÁ÷¿®¤ò³«»Ï¤¹¤ë¡£
-.TP
-.B "TIOCCBRK   void"
-.\"O Turn break off, that is, stop sending zero bits.
-break ¤ò¥ª¥Õ¤Ë¤¹¤ë¡£
-¤Ä¤Þ¤ê 0 ¤Î¥Ó¥Ã¥ÈÎó¤ÎÁ÷¿®¤òÄä»ß¤¹¤ë¡£
-.\"O .SS "Software flow control"
-.SS ¥½¥Õ¥È¥¦¥§¥¢¥Õ¥í¡¼À©¸æ
-.TP
-.BI "TCXONC    int " arg
-.\"O Equivalent to
-.\"O .IR "tcflow(fd, arg)" .
-.I "tcflow(fd, arg)"
-¤ÈƱ¤¸¡£
+(SVr4, UnixWare, Solaris, Linux は、 \fItcsendbreak(fd,arg)\fP の \fIarg\fP が 0
+以外の場合、 \fItcdrain(fd)\fP のように扱う。 SunOS は \fIarg\fP を倍数として扱い、ビットのストリームを \fIarg\fP
+回送信する。 \fIarg\fP が 0 の場合も同じ。 DG/UX と AIX は、(0 以外の場合)  \fIarg\fP をミリ秒単位の時間間隔として扱う。
+HP\-UX は \fIarg\fP を無視する。)
+.TP 
+\fBTCSBRKP     int \fP\fIarg\fP
+いわゆる「POSIX 版」の \fBTCSBRK\fP である。 これは 0 以外の \fIarg\fP を 1/10 秒単位の時間間隔として扱う。 またドライバが
+break をサポートしていない場合は、何もしない。
+.TP 
+\fBTIOCSBRK    void\fP
+break をオンにする。 つまり 0 のビット列の送信を開始する。
+.TP 
+\fBTIOCCBRK    void\fP
+break をオフにする。 つまり 0 のビット列の送信を停止する。
+.SS ソフトウェアフロー制御
+.TP 
+\fBTCXONC      int \fP\fIarg\fP
+\fItcflow(fd, arg)\fP と同じ。
 .br
-.\"O See
-.\"O .BR tcflow (3)
-.\"O for the argument values
-.\"O .BR TCOOFF ,
-.\"O .BR TCOON ,
-.\"O .BR TCIOFF ,
-.\"O .BR TCION .
-.BR tcflow (3)
-¤Î°ú¤­¿ô
-.BR TCOOFF ,
-.BR TCOON ,
-.BR TCIOFF ,
-.B TCION
-¤ò»²¾È¤¹¤ë¤³¤È¡£
-.\"O .SS "Buffer count and flushing"
-.SS "¥Ð¥Ã¥Õ¥¡¤Î¥«¥¦¥ó¥È¤È½ñ¤­½Ð¤· (flush)"
-.TP
-.BI "FIONREAD  int *" argp
-.\"O Get the number of bytes in the input buffer.
-ÆþÎϥХåե¡¤Ë¤¢¤ë¥Ð¥¤¥È¿ô¤ò¼èÆÀ¤¹¤ë¡£
-.TP
-.BI "TIOCINQ   int *" argp
-.\"O Same as
-.\"O .BR FIONREAD .
-.B FIONREAD
-¤ÈƱ¤¸¡£
-.TP
-.BI "TIOCOUTQ  int *" argp
-.\"O Get the number of bytes in the output buffer.
-½ÐÎϥХåե¡¤Ë¤¢¤ë¥Ð¥¤¥È¿ô¤ò¼èÆÀ¤¹¤ë¡£
-.TP
-.BI "TCFLSH    int " arg
-.\"O Equivalent to
-.\"O .IR "tcflush(fd, arg)" .
-.I "tcflush(fd, arg)"
-¤ÈƱ¤¸¡£
+\fBtcflow\fP(3)  の引き数 \fBTCOOFF\fP, \fBTCOON\fP, \fBTCIOFF\fP, \fBTCION\fP を参照すること。
+.SS "バッファのカウントと書き出し (flush)"
+.TP 
+\fBFIONREAD    int *\fP\fIargp\fP
+入力バッファにあるバイト数を取得する。
+.TP 
+\fBTIOCINQ     int *\fP\fIargp\fP
+\fBFIONREAD\fP と同じ。
+.TP 
+\fBTIOCOUTQ    int *\fP\fIargp\fP
+出力バッファにあるバイト数を取得する。
+.TP 
+\fBTCFLSH      int \fP\fIarg\fP
+\fItcflush(fd, arg)\fP と同じ。
 .br
-.\"O See
-.\"O .BR tcflush (3)
-.\"O for the argument values
-.\"O .BR TCIFLUSH ,
-.\"O .BR TCOFLUSH ,
-.\"O .BR TCIOFLUSH .
-.BR tcflush (3)
-¤Î°ú¤­¿ô
-.BR TCIFLUSH ,
-.BR TCOFLUSH ,
-.B TCIOFLUSH
-¤ò»²¾È¤¹¤ë¤³¤È¡£
-.\"O .SS "Faking input"
-.SS ÆþÎϤε¶Áõ
-.TP
-.BI "TIOCSTI   const char *" argp
-.\"O Insert the given byte in the input queue.
-»ØÄꤵ¤ì¤¿¥Ð¥¤¥È¤òÆþÎÏ¥­¥å¡¼¤ËÁÞÆþ¤¹¤ë¡£
-.\"O .SS "Redirecting console output"
-.SS ¥³¥ó¥½¡¼¥ë½ÐÎϤΥê¥À¥¤¥ì¥¯¥È
-.TP
-.B "TIOCCONS   void"
-.\"O Redirect output that would have gone to
-.\"O .I /dev/console
-.\"O or
-.\"O .I /dev/tty0
-.\"O to the given terminal.
-.\"O If that was a pseudoterminal master, send it to the slave.
-.I /dev/console
-¤Þ¤¿¤Ï
-.I /dev/tty0
-¤ËÁ÷¤é¤ì¤ë½ÐÎϤò¡¢»ØÄꤵ¤ì¤¿Ã¼Ëö¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£
-»ØÄꤵ¤ì¤¿Ã¼Ëö¤¬µ¿»÷üËö (pseudoterminal) ¤Î¥Þ¥¹¥¿¤Î¾ì¹ç¡¢
-½ÐÎϤϥ¹¥ì¡¼¥Ö¤ËÁ÷¤é¤ì¤ë¡£
-.\"O In Linux before version 2.6.10,
-.\"O anybody can do this as long as the output was not redirected yet;
-.\"O since version 2.6.10, only root (a process with the
-.\"O .BR CAP_SYS_ADMIN
-.\"O capability) may do this.
-¥Ð¡¼¥¸¥ç¥ó 2.6.10 ¤è¤êÁ°¤Î Linux ¤Ç¤Ï¡¢½ÐÎϤ¬¤Þ¤À¥ê¥À¥¤¥ì¥¯¥È¤µ¤ì¤Æ
-¤¤¤Ê¤±¤ì¤Ð¡¢Ã¯¤Ç¤â¥ê¥À¥¤¥ì¥¯¥È¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤ë¡£
-¥Ð¡¼¥¸¥ç¥ó 2.6.10 °Ê¹ß¤Ç¤Ï¡¢root
-.RB ( CAP_SYS_ADMIN
-¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ò»ý¤Ä¥×¥í¥»¥¹) ¤À¤±¤¬¥ê¥À¥¤¥ì¥¯¥È¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤ë¡£
-.\"O If output was redirected already
-.\"O .B EBUSY
-.\"O is returned,
-.\"O but redirection can be stopped by using this ioctl with
-.\"O .I fd
-.\"O pointing at
-.\"O .I /dev/console
-.\"O or
-.\"O .IR /dev/tty0 .
-½ÐÎϤ¬¤¹¤Ç¤Ë¥ê¥À¥¤¥ì¥¯¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï
-.B EBUSY
-¤¬ÊÖ¤µ¤ì¤ë¤¬¡¢
-.I /dev/console
-¤«
-.I /dev/tty0
-¤ò»Ø¤·¤Æ¤¤¤ë
-.I fd
-¤ËÂФ·¤Æ¤³¤Î ioctl ¤ò»ÈÍѤ¹¤ë¤³¤È¤Ç¡¢¥ê¥À¥¤¥ì¥¯¥È¤ò»ß¤á¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
-.\"O .SS "Controlling terminal"
-.SS "üËö¤ÎÀ©¸æ"
-.TP
-.BI "TIOCSCTTY int " arg
-.\"O Make the given terminal the controlling terminal of the calling process.
-»ØÄꤵ¤ì¤¿Ã¼Ëö¤ò¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤Ë¤¹¤ë¡£
-.\"O The calling process must be a session leader and not have a
-.\"O controlling terminal already.
-.\"O If this terminal is already the controlling terminal
-.\"O of a different session group then the ioctl fails with
-.\"O .BR EPERM ,
-.\"O unless the caller is root (more precisely: has the
-.\"O .BR CAP_SYS_ADMIN
-.\"O capability) and
-.\"O .I arg
-.\"O equals 1, in which case the terminal is stolen, and all processes that had
-.\"O it as controlling terminal lose it.
-¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤Ï¥»¥Ã¥·¥ç¥ó¥ê¡¼¥À¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤º¡¢
-¤«¤Ä´û¤ËÀ©¸æüËö¤ò»ý¤Ã¤Æ¤¤¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
-¤³¤ÎüËö¤¬´û¤Ë¾¤Î¥»¥Ã¥·¥ç¥ó¥°¥ë¡¼¥×¤ÎÀ©¸æüËö¤Ç¤¢¤ë¾ì¹ç¡¢
-ioctl ¤Ï
-.B EPERM
-¤Ç¼ºÇÔ¤¹¤ë¡£¤¿¤À¤·¸Æ¤Ó½Ð¤·¤¿¥æ¡¼¥¶¤¬ root ¤Ç
-(¤è¤êÀµ³Î¤Ë¤Ï
-.B CAP_SYS_ADMIN
-¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ò»ý¤Ã¤Æ¤¤¤Æ)¡¢¤«¤Ä
-.I arg
-¤¬ 1 ¤Ç¤¢¤ë¾ì¹ç¤ò½ü¤¯¡£
-¤³¤Î¾ì¹ç¡¢Ã¼Ëö¤ÏÅð¤Þ¤ì (stolen)¡¢
-¤³¤ÎüËö¤òÀ©¸æüËö¤È¤·¤Æ¤¤¤¿Á´¤Æ¤Î¥×¥í¥»¥¹¤ÏüËö¤ò¼º¤¦¡£
-.TP
-.B TIOCNOTTY   void
-.\"O If the given terminal was the controlling terminal of the calling process,
-.\"O give up this controlling terminal.
-.\"O If the process was session leader,
-.\"O then send
-.\"O .B SIGHUP
-.\"O and
-.\"O .B SIGCONT
-.\"O to the foreground process group
-.\"O and all processes in the current session lose their controlling terminal.
-»ØÄꤵ¤ì¤¿Ã¼Ëö¤¬¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤Ç¤¢¤ë¾ì¹ç¡¢
-¤³¤ÎÀ©¸æüËö¤òÊü´þ¤¹¤ë¡£
-¥×¥í¥»¥¹¤¬¥»¥Ã¥·¥ç¥ó¥ê¡¼¥À¤Î¾ì¹ç¡¢
-¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¥°¥ë¡¼¥×¤Ë
-.B SIGHUP
-¤È
-.B SIGCONT
-¤òÁ÷¤ê¡¢¥«¥ì¥ó¥È¥»¥Ã¥·¥ç¥ó¤ÎÁ´¤Æ¤Î¥×¥í¥»¥¹¤ÏÀ©¸æüËö¤ò¼º¤¦¡£
-.\"O .SS "Process group and session ID"
-.SS "¥°¥ë¡¼¥× ID ¤È¥»¥Ã¥·¥ç¥ó ID ¤Î½èÍý"
-.TP
-.BI "TIOCGPGRP pid_t *" argp
-.\"O When successful, equivalent to
-.\"O .IR "*argp = tcgetpgrp(fd)" .
-À®¸ù¤·¤¿¾ì¹ç¡¢
-.I "*argp = tcgetpgrp(fd)"
-¤ÈƱ¤¸¡£
+\fBtcflush\fP(3)  の引き数 \fBTCIFLUSH\fP, \fBTCOFLUSH\fP, \fBTCIOFLUSH\fP を参照すること。
+.SS 入力の偽装
+.TP 
+\fBTIOCSTI     const char *\fP\fIargp\fP
+指定されたバイトを入力キューに挿入する。
+.SS コンソール出力のリダイレクト
+.TP 
+\fBTIOCCONS    void\fP
+\fI/dev/console\fP または \fI/dev/tty0\fP に送られる出力を、指定された端末リダイレクトする。 指定された端末が疑似端末
+(pseudoterminal) のマスタの場合、 出力はスレーブに送られる。 バージョン 2.6.10 より前の Linux
+では、出力がまだリダイレクトされて いなければ、誰でもリダイレクトを行うことができる。 バージョン 2.6.10 以降では、root
+(\fBCAP_SYS_ADMIN\fP ケーパビリティを持つプロセス) だけがリダイレクトを行うことができる。 出力がすでにリダイレクトされている場合は
+\fBEBUSY\fP が返されるが、 \fI/dev/console\fP か \fI/dev/tty0\fP を指している \fIfd\fP に対してこの ioctl
+を使用することで、リダイレクトを止めることができる。
+.SS 端末の制御
+.TP 
+\fBTIOCSCTTY   int \fP\fIarg\fP
+指定された端末を呼び出し元のプロセスの制御端末にする。 呼び出し元のプロセスはセッションリーダでなければならず、
+かつ既に制御端末を持っていてはならない。 この端末が既に他のセッショングループの制御端末である場合、 ioctl は \fBEPERM\fP
+で失敗する。ただし呼び出したユーザが root で (より正確には \fBCAP_SYS_ADMIN\fP ケーパビリティを持っていて)、かつ \fIarg\fP
+が 1 である場合を除く。 この場合、端末は盗まれ (stolen)、 この端末を制御端末としていた全てのプロセスは端末を失う。
+.TP 
+\fBTIOCNOTTY   void\fP
+指定された端末が呼び出し元のプロセスの制御端末である場合、 この制御端末を放棄する。 プロセスがセッションリーダの場合、
+フォアグラウンドプロセスグループに \fBSIGHUP\fP と \fBSIGCONT\fP を送り、カレントセッションの全てのプロセスは制御端末を失う。
+.SS "グループ ID とセッション ID の処理"
+.TP 
+\fBTIOCGPGRP   pid_t *\fP\fIargp\fP
+成功した場合、 \fI*argp = tcgetpgrp(fd)\fP と同じ。
 .br
-.\"O Get the process group ID of the foreground process group on this terminal.
-¤³¤ÎüËö¾å¤Î¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹¥°¥ë¡¼¥× ID ¤ò¼èÆÀ¤¹¤ë¡£
-.TP
-.BI "TIOCSPGRP const pid_t *" argp
-.\"O Equivalent to
-.\"O .IR "tcsetpgrp(fd, *argp)" .
-.I "tcsetpgrp(fd, *argp)"
-¤ÈƱ¤¸¡£
+この端末上のフォアグラウンドプロセスのプロセスグループ ID を取得する。
+.TP 
+\fBTIOCSPGRP   const pid_t *\fP\fIargp\fP
+\fItcsetpgrp(fd, *argp)\fP と同じ。
 .br
-.\"O Set the foreground process group ID of this terminal.
-¤³¤ÎüËö¤Î¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¤Î¥°¥ë¡¼¥× ID ¤òÀßÄꤹ¤ë¡£
-.TP
-.BI "TIOCGSID  pid_t *" argp
-.\"O Get the session ID of the given terminal.
-.\"O This will fail with
-.\"O .B ENOTTY
-.\"O in case the terminal is not a master pseudoterminal
-.\"O and not our controlling terminal.
-.\"O Strange.
-»ØÄꤵ¤ì¤¿Ã¼Ëö¤Î¥»¥Ã¥·¥ç¥ó ID ¤ò¼èÆÀ¤¹¤ë¡£
-üËö¤¬¥Þ¥¹¥¿µ¿»÷üËö¤Þ¤¿¤ÏÀ©¸æüËö¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢
-.B ENOTTY
-¤Ç¼ºÇÔ¤¹¤ë¡£
-´ñ̯¤À¡£
-.\"O .SS "Exclusive mode"
-.SS ÇÓ¾¥â¡¼¥É
-.TP
-.B "TIOCEXCL   void"
-.\"O Put the terminal into exclusive mode.
-.\"O No further
-.\"O .BR open (2)
-.\"O operations on the terminal are permitted.
-.\"O (They will fail with
-.\"O .BR EBUSY ,
-.\"O except for root, that is, a process with the
-.\"O .BR CAP_SYS_ADMIN
-.\"O capability.)
-üËö¤òÇÓ¾¥â¡¼¥É¤Ë¤¹¤ë¡£
-üËö¤ËÂФ·¤Æ¡¢¤³¤ì°Ê¹ß¤Î
-.BR open (2)
-Áàºî¤ò¶Ø»ß¤¹¤ë¡£
-(root °Ê³°¤Î¾ì¹ç¡¢¤Ä¤Þ¤ê
-.B CAP_SYS_ADMIN
-¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ò»ý¤¿¤Ê¤¤¥×¥í¥»¥¹¤Î¾ì¹ç¡¢¤³¤ì°Ê¹ß¤Î
-.BR open (2)
-¤Ï
-.B EBUSY
-¤Ç¼ºÇÔ¤¹¤ë¡£)
-.TP
-.B "TIOCNXCL   void"
-.\"O Disable exclusive mode.
-ÇÓ¾¥â¡¼¥É¤ò̵¸ú¤Ë¤¹¤ë¡£
-.\"O .SS "Line discipline"
-.SS "¥é¥¤¥óÀ©¸æ (line discipline)"
-.TP
-.BI "TIOCGETD  int *" argp
-.\"O Get the line discipline of the terminal.
-üËö¤Î¥é¥¤¥óÀ©¸æ¤Î¾ðÊó¤ò¼èÆÀ¤¹¤ë¡£
-.TP
-.BI "TIOCSETD  const int *" argp
-.\"O Set the line discipline of the terminal.
-üËö¤Î¥é¥¤¥óÀ©¸æ¤Î¾ðÊó¤òÀßÄꤹ¤ë¡£
-.\"O .SS "Pseudoterminal ioctls"
-.SS "µ¿»÷üËö¤Î ioctl"
-.TP
-.BI "TIOCPKT   const int *" argp
-.\"O Enable (when
-.\"O .RI * argp
-.\"O is nonzero) or disable packet mode.
-¥Ñ¥±¥Ã¥È¥â¡¼¥É¤òÍ­¸ú
-.RI (* argp
-¤¬ 0 °Ê³°¤Î¾ì¹ç) ¤Þ¤¿¤Ï̵¸ú¤Ë¤¹¤ë¡£
-.\"O Can be applied to the master side of a pseudoterminal only (and will return
-.\"O .B ENOTTY
-.\"O otherwise).
-.\"O In packet mode, each subsequent
-.\"O .BR read (2)
-.\"O will return a packet that either contains a single nonzero control byte,
-.\"O or has a single byte containing zero (\(aq\0\(aq) followed by data
-.\"O written on the slave side of the pseudoterminal.
-.\"O If the first byte is not
-.\"O .B TIOCPKT_DATA
-.\"O (0), it is an OR of one
-.\"O or more of the following bits:
-µ¿»÷üËö¤Î¥Þ¥¹¥¿Â¦¤Ë¤Î¤ßŬÍѤǤ­¤ë (¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï
-.B ENOTTY
-¤òÊÖ¤¹)¡£
-¥Ñ¥±¥Ã¥È¥â¡¼¥É¤Ç¤Ï¡¢¤½¤Î¸å¤Ë¼Â¹Ô¤µ¤ì¤ë
-.BR read (2)
-¤Ï¡¢Ãͤ¬ 0 °Ê³°¤Î 1 ¤Ä¤ÎÀ©¸æ¥Ð¥¤¥È¤ò´Þ¤à¥Ñ¥±¥Ã¥È¤«¡¢
-Ãͤ¬ 0 ¤Î 1 ¥Ð¥¤¥È (\(aq\\0\(aq) ¤Ëµ¿»÷üËö¤Î¥¹¥ì¡¼¥Ö¦¤Ç½ñ¤­¹þ¤Þ¤ì¤¿
-¥Ç¡¼¥¿¤¬Â³¤¯¥Ñ¥±¥Ã¥È¤òÊÖ¤¹¡£
-ºÇ½é¤Î¥Ð¥¤¥È¤¬
-.B TIOCPKT_DATA
-(0) ¤Ç¤Ê¤¤¾ì¹ç¡¢°Ê²¼¤Î¥Ó¥Ã¥È¤Î 1 ¤Ä°Ê¾å¤ò OR ¤·¤¿¤â¤Î¤Ç¤¢¤ë:
+この端末のフォアグラウンドプロセスのグループ ID を設定する。
+.TP 
+\fBTIOCGSID    pid_t *\fP\fIargp\fP
+指定された端末のセッション ID を取得する。 端末がマスタ疑似端末または制御端末でない場合は、 \fBENOTTY\fP で失敗する。 奇妙だ。
+.SS 排他モード
+.TP 
+\fBTIOCEXCL    void\fP
+端末を排他モードにする。 端末に対して、これ以降の \fBopen\fP(2)  操作を禁止する。 (root 以外の場合、つまり
+\fBCAP_SYS_ADMIN\fP ケーパビリティを持たないプロセスの場合、これ以降の \fBopen\fP(2)  は \fBEBUSY\fP で失敗する。)
+.TP 
+\fBTIOCNXCL    void\fP
+排他モードを無効にする。
+.SS "ライン制御 (line discipline)"
+.TP 
+\fBTIOCGETD    int *\fP\fIargp\fP
+端末のライン制御の情報を取得する。
+.TP 
+\fBTIOCSETD    const int *\fP\fIargp\fP
+端末のライン制御の情報を設定する。
+.SS "疑似端末の ioctl"
+.TP 
+\fBTIOCPKT     const int *\fP\fIargp\fP
+パケットモードを有効 (*\fIargp\fP が 0 以外の場合) または無効にする。 疑似端末のマスタ側にのみ適用できる (それ以外の場合は
+\fBENOTTY\fP を返す)。 パケットモードでは、その後に実行される \fBread\fP(2)  は、値が 0 以外の 1
+つの制御バイトを含むパケットか、 値が 0 の 1 バイト (\(aq\e0\(aq) に疑似端末のスレーブ側で書き込まれた
+データが続くパケットを返す。 最初のバイトが \fBTIOCPKT_DATA\fP (0) でない場合、以下のビットの 1 つ以上を OR したものである:
 
 .nf
-.\"O TIOCPKT_FLUSHREAD   The read queue for the terminal is flushed.
-TIOCPKT_FLUSHREAD   Ã¼Ëö¤ÎÆɤ߹þ¤ß¥­¥å¡¼¤¬¥Õ¥é¥Ã¥·¥å (flush) ¤µ¤ì¤ë¡£
-.\"O TIOCPKT_FLUSHWRITE  The write queue for the terminal is flushed.
-TIOCPKT_FLUSHWRITE  Ã¼Ëö¤Î½ñ¤­½Ð¤·¥­¥å¡¼¤¬¥Õ¥é¥Ã¥·¥å¤µ¤ì¤ë¡£
-.\"O TIOCPKT_STOP        Output to the terminal is stopped.
-TIOCPKT_STOP        Ã¼Ëö¤Ø¤Î½ÐÎϤ¬Ää»ß¤µ¤ì¤ë¡£
-.\"O TIOCPKT_START       Output to the terminal is restarted.
-TIOCPKT_START       Ã¼Ëö¤Ø¤Î½ÐÎϤ¬ºÆ³«¤µ¤ì¤ë¡£
-.\"O TIOCPKT_DOSTOP      The start and stop characters are \fB^S\fP/\fB^Q\fP.
-.\"O TIOCPKT_NOSTOP      The start and stop characters are not \fB^S\fP/\fB^Q\fP.
-TIOCPKT_DOSTOP      ³«»Ïʸ»ú¤È½ªÎ»Ê¸»ú¤¬ \fB^S\fP/\fB^Q\fP ¤Ç¤¢¤ë¡£
-TIOCPKT_NOSTOP      ³«»Ïʸ»ú¤È½ªÎ»Ê¸»ú¤¬ \fB^S\fP/\fB^Q\fP ¤Ç¤Ê¤¤¡£
+TIOCPKT_FLUSHREAD   端末の読み込みキューがフラッシュ (flush) される。
+TIOCPKT_FLUSHWRITE  端末の書き出しキューがフラッシュされる。
+TIOCPKT_STOP        端末への出力が停止される。
+TIOCPKT_START       端末への出力が再開される。
+TIOCPKT_DOSTOP      開始文字と終了文字が \fB^S\fP/\fB^Q\fP である。
+TIOCPKT_NOSTOP      開始文字と終了文字が \fB^S\fP/\fB^Q\fP でない。
 .fi
 
-.\"O While this mode is in use, the presence
-.\"O of control status information to be read
-.\"O from the master side may be detected by a
-.\"O .BR select (2)
-.\"O for exceptional conditions.
-¤³¤Î¥â¡¼¥É¤¬»È¤ï¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
-À©¸æ¾õÂÖ¾ðÊó¤Î¸ºß¤¬¥Þ¥¹¥¿Â¦¤«¤éÆɤ߹þ¤á¤ë¤«¤Ï¡¢
-Î㳰Ū¤Ê¾ò·ï¤Ç
-.BR select (2)
-¤ò»È¤¦¤³¤È¤Ë¤è¤êÃΤ뤳¤È¤¬¤Ç¤­¤ë¡£
+このモードが使われている場合、 制御状態情報の存在がマスタ側から読み込めるかは、 例外的な条件で \fBselect\fP(2)
+を使うことにより知ることができる。
 
-.\"O This mode is used by
-.\"O .BR rlogin (1)
-.\"O and
-.\"O .BR rlogind (8)
-.\"O to implement a remote-echoed,
-.\"O locally \fB^S\fP/\fB^Q\fP flow-controlled remote login.
-¤³¤Î¥â¡¼¥É¤Ï
-.BR rlogin (1)
-¤È
-.BR rlogind (8)
-¤Ç»È¤ï¤ì¡¢¥ê¥â¡¼¥È¥¨¥³¡¼¤Î¥ê¥â¡¼¥È¥í¥°¥¤¥ó¤È
-¥í¡¼¥«¥ë¤Ç¤Î \fB^S\fP/\fB^Q\fP ¥Õ¥í¡¼À©¸æ¤Î¥ê¥â¡¼¥È¥í¥°¥¤¥ó¤ò¼ÂÁõ¤·¤Æ¤¤¤ë¡£
+このモードは \fBrlogin\fP(1)  と \fBrlogind\fP(8)  で使われ、リモートエコーのリモートログインと ローカルでの
+\fB^S\fP/\fB^Q\fP フロー制御のリモートログインを実装している。
 
-.\"O The BSD ioctls
-.\"O .BR TIOCSTOP ,
-.\"O .BR TIOCSTART ,
-.\"O .BR TIOCUCNTL ,
-.\"O .B TIOCREMOTE
-.\"O have not been implemented under Linux.
-BSD ¤Î ioctl ¤Ç¤¢¤ë
-.BR TIOCSTOP ,
-.BR TIOCSTART ,
-.BR TIOCUCNTL ,
-.B TIOCREMOTE
-¤Ï¡¢Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
-.\"O .SS "Modem control"
-.SS ¥â¥Ç¥àÀ©¸æ
-.TP
-.BI "TIOCMGET  int *" argp
-.\"O get the status of modem bits.
-¥â¥Ç¥à¥Ó¥Ã¥ÈÎó¤Î¾õÂÖ¤ò¼èÆÀ¤¹¤ë¡£
-.TP
-.BI "TIOCMSET  const int *" argp
-.\"O set the status of modem bits.
-¥â¥Ç¥à¥Ó¥Ã¥ÈÎó¤Î¾õÂÖ¤òÀßÄꤹ¤ë¡£
-.TP
-.BI "TIOCMBIC  const int *" argp
-.\"O clear the indicated modem bits.
-»ØÄꤵ¤ì¤¿¥â¥Ç¥à¥Ó¥Ã¥ÈÎó¤ò¥¯¥ê¥¢¤¹¤ë¡£
-.TP
-.BI "TIOCMBIS  const int *" argp
-.\"O set the indicated modem bits.
-»ØÄꤵ¤ì¤¿¥â¥Ç¥à¥Ó¥Ã¥ÈÎó¤òÀßÄꤹ¤ë¡£
+BSD の ioctl である \fBTIOCSTOP\fP, \fBTIOCSTART\fP, \fBTIOCUCNTL\fP, \fBTIOCREMOTE\fP
+は、Linux では実装されていない。
+.SS モデム制御
+.TP 
+\fBTIOCMGET    int *\fP\fIargp\fP
+モデムビット列の状態を取得する。
+.TP 
+\fBTIOCMSET    const int *\fP\fIargp\fP
+モデムビット列の状態を設定する。
+.TP 
+\fBTIOCMBIC    const int *\fP\fIargp\fP
+指定されたモデムビット列をクリアする。
+.TP 
+\fBTIOCMBIS    const int *\fP\fIargp\fP
+指定されたモデムビット列を設定する。
 .LP
-.\"O Bits used by these four ioctls:
-¤³¤ì¤é¤Î 4 ¤Ä¤Î ioctl ¤Ç»È¤ï¤ì¤ë¥Ó¥Ã¥È¤Ï°Ê²¼¤ÎÄ̤ê:
+これらの 4 つの ioctl で使われるビットは以下の通り:
 
 .nf
 TIOCM_LE        DSR (data set ready/line enable)
@@ -634,142 +237,58 @@ TIOCM_ST        Secondary TXD (transmit)
 TIOCM_SR        Secondary RXD (receive)
 TIOCM_CTS       CTS (clear to send)
 TIOCM_CAR       DCD (data carrier detect)
-.\"O TIOCM_CD         see TIOCM_CAR
-TIOCM_CD         TIOCM_CAR ¤ò»²¾È¡£
+TIOCM_CD         TIOCM_CAR を参照。
 TIOCM_RNG       RNG (ring)
-.\"O TIOCM_RI         see TIOCM_RNG
-TIOCM_RI         TIOCM_RNG ¤ò»²¾È¡£
+TIOCM_RI         TIOCM_RNG を参照。
 TIOCM_DSR       DSR (data set ready)
 .fi
-.\"O .SS "Marking a line as local"
-.SS "²óÀþ¤ò¥í¡¼¥«¥ë¤È¤·¤Æ¥Þ¡¼¥¯¤¹¤ë"
-.TP
-.BI "TIOCGSOFTCAR      int *" argp
-.\"O ("Get software carrier flag")
-.\"O Get the status of the CLOCAL flag in the c_cflag field of the
-.\"O .I termios
-.\"O structure.
-("¥½¥Õ¥È¥¦¥§¥¢¥­¥ã¥ê¥¢¥Õ¥é¥°¤Î¼èÆÀ")
-.I termios
-¹½Â¤ÂΤΠc_cflag ¥Õ¥£¡¼¥ë¥É¤Î
-.B CLOCAL
-¥Õ¥é¥°¤Î¾õÂÖ¤ò¼èÆÀ¤¹¤ë¡£
-.TP
-.BI "TIOCSSOFTCAR      const int *" argp
-.\"O ("Set software carrier flag")
-.\"O Set the CLOCAL flag in the
-.\"O .I termios
-.\"O structure when
-.\"O .RI * argp
-.\"O is nonzero, and clear it otherwise.
-("¥½¥Õ¥È¥¦¥§¥¢¥­¥ã¥ê¥¢¥Õ¥é¥°¤ÎÀßÄê")
-.RI * argp
-¤¬ 0 °Ê³°¤Î¾ì¹ç¡¢
-.I termios
-¹½Â¤ÂΤÎ
-.B CLOCAL
-¥Õ¥é¥°¤òÀßÄꤹ¤ë¡£
-0 ¤Î¾ì¹ç¤Ï¥¯¥ê¥¢¤¹¤ë¡£
+.SS 回線をローカルとしてマークする
+.TP 
+\fBTIOCGSOFTCAR        int *\fP\fIargp\fP
+("ソフトウェアキャリアフラグの取得")  \fItermios\fP 構造体の c_cflag フィールドの \fBCLOCAL\fP フラグの状態を取得する。
+.TP 
+\fBTIOCSSOFTCAR        const int *\fP\fIargp\fP
+("ソフトウェアキャリアフラグの設定")  *\fIargp\fP が 0 以外の場合、 \fItermios\fP 構造体の \fBCLOCAL\fP
+フラグを設定する。 0 の場合はクリアする。
 .LP
-.\"O If the
-.\"O .B CLOCAL
-.\"O flag for a line is off, the hardware carrier detect (DCD)
-.\"O signal is significant, and an
-.\"O .BR open (2)
-.\"O of the corresponding terminal will block until DCD is asserted,
-.\"O unless the
-.\"O .B O_NONBLOCK
-.\"O flag is given.
-¥é¥¤¥ó¤Î
-.B CLOCAL
-¥Õ¥é¥°¤¬¥ª¥Õ¤Î¾ì¹ç¡¢
-¥Ï¡¼¥É¥¦¥§¥¢¥­¥ã¥ê¥¢¸¡½Ð (hardware carrier detect, DCD) ¥·¥°¥Ê¥ë¤¬½ÅÍפǤ¢¤ê¡¢
-.B O_NONBLOCK
-¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤Ê¤¤¸Â¤ê¡¢Âбþ¤¹¤ëüËö¤Î
-.BR open (2)
-¤Ï DCD ¤¬¼¨¤µ¤ì¤ë¤Þ¤Ç¥Ö¥í¥Ã¥¯¤µ¤ì¤ë¡£
-.\"O If
-.\"O .B CLOCAL
-.\"O is set, the line behaves as if DCD is always asserted.
-.B CLOCAL
-¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
-¥é¥¤¥ó¤Ï¾ï¤Ë DCD ¤¬¼¨¤µ¤ì¤Æ¤¤¤ë¤«¤Î¤è¤¦¤ËÆ°ºî¤¹¤ë¡£
-.\"O The software carrier flag is usually turned on for local devices,
-.\"O and is off for lines with modems.
-¥½¥Õ¥È¥¦¥§¥¢¥­¥ã¥ê¥¢¥Õ¥é¥°¤Ï¡¢¥í¡¼¥«¥ë¥Ç¥Ð¥¤¥¹¤Ç¤ÏÄ̾ï¤Ï¥ª¥ó¤Ë¤Ê¤Ã¤Æ¤ª¤ê¡¢
-¥â¥Ç¥à¤Î¥é¥¤¥ó¤Ç¤Ï¥ª¥Õ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
-.\"O .SS "Linux-specific"
-.SS "Linux ¸ÇÍ­¤Î ioctl"
-.\"O For the
-.\"O .B TIOCLINUX
-.\"O ioctl, see
-.\"O .BR console_ioctl (4).
-.B TIOCLINUX
-ioctl ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
-.BR console_ioctl (4)
-¤ò»²¾È¤¹¤ë¤³¤È¡£
-.\"O .SS "Kernel debugging"
-.SS ¥«¡¼¥Í¥ë¥Ç¥Ð¥Ã¥®¥ó¥°
-.B "#include <linux/tty.h>"
-.TP
-.BI "TIOCTTYGSTRUCT    struct tty_struct *" argp
-.\"O Get the
-.\"O .I tty_struct
-.\"O corresponding to
-.\"O .IR fd .
-.I fd
-¤ËÂбþ¤¹¤ë
-.I tty_struct
-¤ò¼èÆÀ¤¹¤ë¡£
-.\"O .\" .SS "Serial info"
-.\" .SS "¥·¥ê¥¢¥ë¾ðÊó"
+ラインの \fBCLOCAL\fP フラグがオフの場合、 ハードウェアキャリア検出 (hardware carrier detect, DCD)
+シグナルが重要であり、 \fBO_NONBLOCK\fP フラグが指定されない限り、対応する端末の \fBopen\fP(2)  は DCD
+が示されるまでブロックされる。 \fBCLOCAL\fP が設定されている場合、 ラインは常に DCD が示されているかのように動作する。
+ソフトウェアキャリアフラグは、ローカルデバイスでは通常はオンになっており、 モデムのラインではオフになっている。
+.SS "Linux 固有の ioctl"
+\fBTIOCLINUX\fP ioctl については、 \fBconsole_ioctl\fP(4)  を参照すること。
+.SS カーネルデバッギング
+\fB#include <linux/tty.h>\fP
+.TP 
+\fBTIOCTTYGSTRUCT      struct tty_struct *\fP\fIargp\fP
+.\"
+.\" .SS "Serial info"
 .\" .BR "#include <linux/serial.h>"
 .\" .sp
 .\" .TP
 .\" .BI "TIOCGSERIAL   struct serial_struct *" argp
-.\"O .\" Get serial info.
-.\" ¥·¥ê¥¢¥ë¾ðÊó¤ò¼èÆÀ¤¹¤ë¡£
+.\" Get serial info.
 .\" .TP
 .\" .BI "TIOCSSERIAL   const struct serial_struct *" argp
-.\"O .\" Set serial info.
-.\" ¥·¥ê¥¢¥ë¾ðÊó¤òÀßÄꤹ¤ë¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O The
-.\"O .BR ioctl (2)
-.\"O system call returns 0 on success.
-.\"O On error it returns \-1 and sets
-.\"O .I errno
-.\"O appropriately.
-.BR ioctl (2)
-¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢À®¸ù¤·¤¿¾ì¹ç¤Ï 0 ¤òÊÖ¤¹¡£
-¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤òÊÖ¤·¡¢
-.I errno
-¤òŬÀÚ¤ËÀßÄꤹ¤ë¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.TP
-.B EINVAL
-.\"O Invalid command parameter.
-ÉÔÀµ¤Ê¥³¥Þ¥ó¥É°ú¤­¿ô¤Ç¤¢¤ë¡£
-.TP
-.B ENOIOCTLCMD
-.\"O Unknown command.
-ÉÔÌÀ¤Ê¥³¥Þ¥ó¥É¤Ç¤¢¤ë¡£
-.TP
-.B ENOTTY
-.\"O Inappropriate
-.\"O .IR fd .
-.I fd
-¤¬ÉÔŬÀڤǤ¢¤ë¡£
-.TP
-.B EPERM
-.\"O Insufficient permission.
-¸¢¸Â¤¬ÉÔ­¤·¤Æ¤¤¤ë¡£
-.\"O .SH EXAMPLE
-.SH Îã
-.\"O Check the condition of DTR on the serial port.
-¥·¥ê¥¢¥ë¥Ý¡¼¥È¤Î DTR ¤Î¾õÂÖ¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+.\" Set serial info.
+\fIfd\fP に対応する \fItty_struct\fP を取得する。
+.SH 返り値
+\fBioctl\fP(2)  システムコールは、成功した場合は 0 を返す。 エラーの場合は \-1 を返し、 \fIerrno\fP を適切に設定する。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+不正なコマンド引き数である。
+.TP 
+\fBENOIOCTLCMD\fP
+不明なコマンドである。
+.TP 
+\fBENOTTY\fP
+\fIfd\fP が不適切である。
+.TP 
+\fBEPERM\fP
+権限が不足している。
+.SH 例
+シリアルポートの DTR の状態をチェックする。
 
 .nf
 #include <termios.h>
@@ -784,27 +303,19 @@ main(void)
     fd = open("/dev/ttyS0", O_RDONLY);
     ioctl(fd, TIOCMGET, &serial);
     if (serial & TIOCM_DTR)
-.\"O         puts("TIOCM_DTR is not set");
-        puts("TIOCM_DTR ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡£");
+        puts("TIOCM_DTR が設定されていない。");
     else
-.\"O         puts("TIOCM_DTR is set");
-        puts("TIOCM_DTR ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¡£");
+        puts("TIOCM_DTR が設定されている。");
     close(fd);
 }
 .fi
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR ioctl (2),
-.BR termios (3),
-.BR console_ioctl (4),
-.BR pty (7)
+.SH 関連項目
 .\"
 .\" FIONBIO                    const int *
 .\" FIONCLEX                   void
 .\" FIOCLEX                    void
 .\" FIOASYNC                   const int *
-.\"O .\" from serial.c:
-.\" serial.c ¤è¤ê:
+.\" from serial.c:
 .\" TIOCSERCONFIG              void
 .\" TIOCSERGWILD               int *
 .\" TIOCSERSWILD               const int *
@@ -812,5 +323,9 @@ main(void)
 .\" TIOCSERGETLSR              int *
 .\" TIOCSERGETMULTI            struct serial_multiport_struct *
 .\" TIOCSERSETMULTI            const struct serial_multiport_struct *
-.\"O .\" TIOCGSERIAL, TIOCSSERIAL (see above)
-.\" TIOCGSERIAL, TIOCSSERIAL (¾åµ­¤ò»²¾È)
+.\" TIOCGSERIAL, TIOCSSERIAL (see above)
+\fBioctl\fP(2), \fBtermios\fP(3), \fBconsole_ioctl\fP(4), \fBpty\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。