summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/pty.4 3.html
blob: d97572d64d8c3fcdaf4879914c5bd8f5de488f3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<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> &#x2014; <span class="Nd">old-style
    compatibility 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">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 the
    traditional BSD naming scheme that was used for accessing pseudo-terminals
    before it was replaced by <a class="Xr">pts(4)</a>. This traditional naming
    is still used in Linux. When the device <span class="Pa">/dev/ptyXX</span>
    is being opened, a new terminal shall be created with the
    <a class="Xr">pts(4)</a> driver. A device node for this terminal shall be
    created, which has the name <span class="Pa">/dev/ttyXX</span>.</p>
<p class="Pp">The <code class="Nm">pty</code> driver also provides a cloning
    System V <span class="Pa">/dev/ptmx</span> device.</p>
<p class="Pp">New code should not try to allocate pseudo-terminals using this
    interface. It is only provided for compatibility with older C libraries that
    tried to open such devices when <a class="Xr">posix_openpt(2)</a> was being
    called, and for running Linux binaries.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<p class="Pp">The BSD-style compatibility pseudo-terminal driver uses the
    following device names:</p>
<dl class="Bl-tag">
  <dt><span class="Pa">/dev/pty[l-sL-S][0-9a-v]</span></dt>
  <dd>Pseudo-terminal master devices.</dd>
  <dt><span class="Pa">/dev/tty[l-sL-S][0-9a-v]</span></dt>
  <dd>Pseudo-terminal slave devices.</dd>
  <dt><span class="Pa">/dev/ptmx</span></dt>
  <dd>Control device, returns a file descriptor to a new master pseudo-terminal
      when opened.</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">posix_openpt(2)</a>, <a class="Xr">pts(4)</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">A pseudo-terminal driver appeared in
    <span class="Ux">4.2BSD</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp">Unlike previous implementations, the master and slave device nodes
    are destroyed when the PTY becomes unused. A call to
    <a class="Xr">stat(2)</a> on a nonexistent master device will already cause
    a new master device node to be created. The master device can only be
    destroyed by opening and closing it.</p>
<p class="Pp">The <code class="Nm">pty</code> driver cannot be unloaded, because
    it cannot determine if it is being used.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">October 28, 2019</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>