diff options
Diffstat (limited to 'static/netbsd/man4/pty.4 3.html')
| -rw-r--r-- | static/netbsd/man4/pty.4 3.html | 183 |
1 files changed, 0 insertions, 183 deletions
diff --git a/static/netbsd/man4/pty.4 3.html b/static/netbsd/man4/pty.4 3.html deleted file mode 100644 index ff6ee275..00000000 --- a/static/netbsd/man4/pty.4 3.html +++ /dev/null @@ -1,183 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">PTY(4)</td> - <td class="head-vol">Device Drivers Manual</td> - <td class="head-rtitle">PTY(4)</td> - </tr> -</table> -<div class="manual-text"> -<section class="Sh"> -<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1> -<p class="Pp"><code class="Nm">pty</code> — <span class="Nd">pseudo - terminal driver</span></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> -<p class="Pp"><code class="Cd">pseudo-device pty</code></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> -<p class="Pp">The <code class="Nm">pty</code> driver provides support for a - device-pair termed a - <a class="permalink" href="#pseudo"><i class="Em" id="pseudo">pseudo - terminal</i></a>. A pseudo terminal is a pair of character devices, a - <a class="permalink" href="#master"><i class="Em" id="master">master</i></a> - device and a - <a class="permalink" href="#slave"><i class="Em" id="slave">slave</i></a> - device. The slave device provides to a process an interface identical to - that described in <a class="Xr">tty(4)</a>. However, whereas all other - devices which provide the interface described in <a class="Xr">tty(4)</a> - have a hardware device of some sort behind them, the slave device has, - instead, another process manipulating it through the master half of the - pseudo terminal. That is, anything written on the master device is given to - the slave device as input and anything written on the slave device is - presented as input on the master device.</p> -<p class="Pp" id="kern.maxptys">Pseudo terminal pairs are allocated on as-needed - basis, maximum number of them is controlled via - <a class="permalink" href="#kern.maxptys"><i class="Em">kern.maxptys</i></a> - sysctl (defaults to 992).</p> -<p class="Pp">The following <a class="Xr">ioctl(2)</a> calls apply only to - pseudo terminals:</p> -<dl class="Bl-tag"> - <dt id="TIOCEXT"><a class="permalink" href="#TIOCEXT"><code class="Dv">TIOCEXT</code></a></dt> - <dd>Enable/disable “external processing”. This affects delivery - of <code class="Dv">TIOCPKT_IOCTL</code> packets. External processing is - enabled by specifying (by reference) a nonzero <var class="Vt">int</var> - parameter and disabled by specifying (by reference) a zero - <var class="Vt">int</var> parameter. - <p class="Pp"><code class="Dv">TIOCEXT</code> is reset to its default - (disabled) when the slave closes the <code class="Nm">pty</code>.</p> - </dd> - <dt id="TIOCSTOP"><a class="permalink" href="#TIOCSTOP"><code class="Dv">TIOCSTOP</code></a></dt> - <dd>Stops output to a terminal (e.g. like typing - ‘<code class="Li">^S</code>’). Takes no parameter.</dd> - <dt id="TIOCSTART"><a class="permalink" href="#TIOCSTART"><code class="Dv">TIOCSTART</code></a></dt> - <dd>Restarts output (stopped by <code class="Dv">TIOCSTOP</code> or by typing - ‘<code class="Li">^S</code>’). Takes no parameter.</dd> - <dt id="TIOCPKT"><a class="permalink" href="#TIOCPKT"><code class="Dv">TIOCPKT</code></a></dt> - <dd>Enable/disable - <a class="permalink" href="#packet"><i class="Em" id="packet">packet</i></a> - mode. Packet mode is enabled by specifying (by reference) a nonzero - <var class="Vt">int</var> parameter and disabled by specifying (by - reference) a zero <var class="Vt">int</var> parameter. When applied to the - master side of a pseudo terminal, each subsequent - <a class="Xr">read(2)</a> from the terminal will return data written on - the slave part of the pseudo terminal preceded by a zero byte - (symbolically defined as <code class="Dv">TIOCPKT_DATA</code>), or a - single byte reflecting control status information. In the latter case, the - byte is an inclusive-or of zero or more of the bits: - <dl class="Bl-tag"> - <dt id="TIOCPKT_FLUSHREAD"><a class="permalink" href="#TIOCPKT_FLUSHREAD"><code class="Dv">TIOCPKT_FLUSHREAD</code></a></dt> - <dd>whenever the read queue for the terminal is flushed.</dd> - <dt id="TIOCPKT_FLUSHWRITE"><a class="permalink" href="#TIOCPKT_FLUSHWRITE"><code class="Dv">TIOCPKT_FLUSHWRITE</code></a></dt> - <dd>whenever the write queue for the terminal is flushed.</dd> - <dt id="TIOCPKT_STOP"><a class="permalink" href="#TIOCPKT_STOP"><code class="Dv">TIOCPKT_STOP</code></a></dt> - <dd>whenever output to the terminal is stopped a la - ‘<code class="Li">^S</code>’.</dd> - <dt id="TIOCPKT_START"><a class="permalink" href="#TIOCPKT_START"><code class="Dv">TIOCPKT_START</code></a></dt> - <dd>whenever output to the terminal is restarted.</dd> - <dt id="TIOCPKT_DOSTOP"><a class="permalink" href="#TIOCPKT_DOSTOP"><code class="Dv">TIOCPKT_DOSTOP</code></a></dt> - <dd>whenever - <a class="permalink" href="#t_stopc"><i class="Em" id="t_stopc">t_stopc</i></a> - is ‘<code class="Li">^S</code>’ and - <a class="permalink" href="#t_startc"><i class="Em" id="t_startc">t_startc</i></a> - is ‘<code class="Li">^Q</code>’.</dd> - <dt id="TIOCPKT_NOSTOP"><a class="permalink" href="#TIOCPKT_NOSTOP"><code class="Dv">TIOCPKT_NOSTOP</code></a></dt> - <dd>whenever the start and stop characters are not - ‘<code class="Li">^S/^Q</code>’. - <p class="Pp">While this mode is in use, the presence of control status - information to be read from the master side may be detected by a - <a class="Xr">select(2)</a> for exceptional conditions.</p> - <p class="Pp">This mode is used by <a class="Xr">rlogin(1)</a> and - <a class="Xr">rlogind(8)</a> to implement a remote-echoed, locally - ‘<code class="Li">^S/^Q</code>’ flow-controlled remote - login with proper back-flushing of output; it can be used by other - similar programs.</p> - </dd> - <dt id="TIOCPKT_IOCTL"><a class="permalink" href="#TIOCPKT_IOCTL"><code class="Dv">TIOCPKT_IOCTL</code></a></dt> - <dd>When this bit is set, the slave has changed the - <a class="Xr">termios(4)</a> structure (TTY state), and the remainder - of the data read from the master side of the - <code class="Nm">pty</code> is the new <a class="Xr">termios(4)</a> - structure. The master side of the <code class="Nm">pty</code> can also - use <a class="Xr">tcgetattr(3)</a> to read the new - <a class="Xr">termios(4)</a> structure. - <p class="Pp">The master will not read packets with the bit - <code class="Dv">TIOCPKT_IOCTL</code> set until it has activated - “external processing” using - <code class="Dv">TIOCEXT</code>.</p> - <p class="Pp">This is used by <a class="Xr">telnetd(8)</a> to implement - TELNET "line mode" - it allows the - <a class="Xr">telnetd(8)</a> to detect <a class="Xr">tty(4)</a> - state changes by the slave, and negotiate the appropriate TELNET - protocol equivalents with the remote peer.</p> - </dd> - </dl> - </dd> - <dt id="TIOCUCNTL"><a class="permalink" href="#TIOCUCNTL"><code class="Dv">TIOCUCNTL</code></a></dt> - <dd>Enable/disable a mode that allows a small number of simple user - <a class="Xr">ioctl(2)</a> commands to be passed through the - pseudo-terminal, using a protocol similar to that of - <code class="Dv">TIOCPKT</code>. The <code class="Dv">TIOCUCNTL</code> and - <code class="Dv">TIOCPKT</code> modes are mutually exclusive. This mode is - enabled from the master side of a pseudo terminal by specifying (by - reference) a nonzero <var class="Vt">int</var> parameter and disabled by - specifying (by reference) a zero <var class="Vt">int</var> parameter. Each - subsequent <a class="Xr">read(2)</a> from the master side will return data - written on the slave part of the pseudo terminal preceded by a zero byte, - or a single byte reflecting a user control operation on the slave side. A - user control command consists of a special <a class="Xr">ioctl(2)</a> - operation with no data; the command is given as - <code class="Dv">UIOCCMD</code>(n), where <var class="Ar">n</var> is a - number in the range 1-255. The operation value <var class="Ar">n</var> - will be received as a single byte on the next <a class="Xr">read(2)</a> - from the master side. The <a class="Xr">ioctl(2)</a> - <code class="Dv">UIOCCMD</code>(0) is a no-op that may be used to probe - for the existence of this facility. As with - <code class="Dv">TIOCPKT</code> mode, command operations may be detected - with a <a class="Xr">select(2)</a> for exceptional conditions.</dd> - <dt id="TIOCREMOTE"><a class="permalink" href="#TIOCREMOTE"><code class="Dv">TIOCREMOTE</code></a></dt> - <dd>A mode for the master half of a pseudo terminal, independent of - <code class="Dv">TIOCPKT</code>. This mode causes input to the pseudo - terminal to be flow controlled and not input edited (regardless of the - terminal mode). Each write to the control terminal produces a record - boundary for the process reading the terminal. In normal usage, a write of - data is like the data typed as a line on the terminal; a write of 0 bytes - is like typing an end-of-file character. - <code class="Dv">TIOCREMOTE</code> can be used when doing remote line - editing in a window manager, or whenever flow controlled input is - required.</dd> -</dl> -</section> -<section class="Sh"> -<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1> -<dl class="Bl-tag Bl-compact"> - <dt><span class="Pa">/dev/pty[p-zP-T][0-9a-zA-Z]</span></dt> - <dd>master pseudo terminals</dd> - <dt><span class="Pa">/dev/tty[p-zP-T][0-9a-zA-Z]</span></dt> - <dd>slave pseudo terminals</dd> -</dl> -</section> -<section class="Sh"> -<h1 class="Sh" id="DIAGNOSTICS"><a class="permalink" href="#DIAGNOSTICS">DIAGNOSTICS</a></h1> -<p class="Pp">None.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE - ALSO</a></h1> -<p class="Pp"><a class="Xr">ioctl(2)</a>, <a class="Xr">read(2)</a>, - <a class="Xr">select(2)</a>, <a class="Xr">write(2)</a>, - <a class="Xr">openpty(3)</a>, <a class="Xr">tty(4)</a></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1> -<p class="Pp">The <code class="Nm">pty</code> driver appeared in - <span class="Ux">4.2BSD</span>.</p> -</section> -</div> -<table class="foot"> - <tr> - <td class="foot-date">November 30, 2013</td> - <td class="foot-os">NetBSD 10.1</td> - </tr> -</table> |
