Deleted Added
full compact
pty.4 (155181) pty.4 (162404)
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)pty.4 8.2 (Berkeley) 11/30/93
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)pty.4 8.2 (Berkeley) 11/30/93
33.\" $FreeBSD: head/share/man/man4/pty.4 155181 2006-02-01 14:33:14Z joel $
33.\" $FreeBSD: head/share/man/man4/pty.4 162404 2006-09-18 15:24:20Z ru $
34.\"
35.Dd November 30, 1993
36.Dt PTY 4
37.Os
38.Sh NAME
39.Nm pty
40.Nd pseudo terminal driver
41.Sh SYNOPSIS

--- 130 unchanged lines hidden (view full) ---

172is a no-op that may be used to probe for
173the existence of this facility.
174As with
175.Dv TIOCPKT
176mode, command operations may be detected with a
177.Xr select 2
178for exceptional conditions.
179.El
34.\"
35.Dd November 30, 1993
36.Dt PTY 4
37.Os
38.Sh NAME
39.Nm pty
40.Nd pseudo terminal driver
41.Sh SYNOPSIS

--- 130 unchanged lines hidden (view full) ---

172is a no-op that may be used to probe for
173the existence of this facility.
174As with
175.Dv TIOCPKT
176mode, command operations may be detected with a
177.Xr select 2
178for exceptional conditions.
179.El
180
181There is currently two pty systems available : the original BSD pty, and a
180.Pp
181There is currently two
182.Nm
183systems available: the original
184.Bx Nm ,
185and a
182SysVR4 pts-like implementation.
186SysVR4 pts-like implementation.
183You can switch between the two implementations by setting the
187It is possible to switch between the two implementations by setting the
184.Va kern.pts.enable
188.Va kern.pts.enable
185sysctl. Setting it to 0 will use the BSD pty, to non-zero the pts
186implementation. It defaults to 0.
187You can set the maximum number of ptys which can be allocated at the same time
188with the
189sysctl.
190Setting it to 0 will use the
191.Bx Nm ,
192to non-zero the pts implementation.
193It defaults to 0.
194It is possible to set the maximum number of ptys
195which can be allocated at the same time with the
189.Va kern.pts.max
196.Va kern.pts.max
190sysctl. It defaults to 1000.
197sysctl.
198It defaults to 1000.
191It is not recommanded to use more than 1000 pseudo-terminals, as all software
192which use
193.Xr utmp 5
194will not be able to handle pseudo-terminals with number superior to 999.
199It is not recommanded to use more than 1000 pseudo-terminals, as all software
200which use
201.Xr utmp 5
202will not be able to handle pseudo-terminals with number superior to 999.
195
196The pts implementation also supports the
203.Pp
204The pts implementation also supports the
197.Dv TIOCGPTN
198.Xr ioctl 2
205.Dv TIOCGPTN
206.Xr ioctl 2
199call, which takes a pointer to an unsigned int as a parameter and provides the
207call, which takes a pointer to an
208.Vt "unsigned int"
209as a parameter and provides the
200number of the pty.
210number of the pty.
201
202.Sh FILES
211.Sh FILES
203.Bl -tag -width /dev/tty[p-sP-S][0-9a-v]x -compact
204The files used by the BSD pseudo terminals implementation are :
212The files used by the
213.Bx
214pseudo terminals implementation are:
215.Pp
216.Bl -tag -width ".Pa /dev/tty[p-sP-S][0-9a-v]" -compact
205.It Pa /dev/pty[p-sP-S][0-9a-v]
206master pseudo terminals
207.It Pa /dev/tty[p-sP-S][0-9a-v]
208slave pseudo terminals
217.It Pa /dev/pty[p-sP-S][0-9a-v]
218master pseudo terminals
219.It Pa /dev/tty[p-sP-S][0-9a-v]
220slave pseudo terminals
209
210.El
221.El
211The files used by the pts implementation are :
212.Bl -tag -width /dev/pts/[num]x -compact
222.Pp
223The files used by the pts implementation are:
224.Pp
225.Bl -tag -width ".Pa /dev/pts/[num]" -compact
213.It Pa /dev/ptmx
214control device, returns a file descriptor to a new master pseudo terminal
215when opened.
216.It Pa /dev/pty[num]
217master pseudo terminals
218.It Pa /dev/pts/[num]
219slave pseudo terminals
220.El
221.Sh DIAGNOSTICS
222None.
223.Sh SEE ALSO
224.Xr tty 4
225.Sh HISTORY
226The
227.Nm
228driver appeared in
229.Bx 4.2 .
226.It Pa /dev/ptmx
227control device, returns a file descriptor to a new master pseudo terminal
228when opened.
229.It Pa /dev/pty[num]
230master pseudo terminals
231.It Pa /dev/pts/[num]
232slave pseudo terminals
233.El
234.Sh DIAGNOSTICS
235None.
236.Sh SEE ALSO
237.Xr tty 4
238.Sh HISTORY
239The
240.Nm
241driver appeared in
242.Bx 4.2 .