summaryrefslogtreecommitdiff
path: root/static/netbsd/man4/ptm.4
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 15:32:58 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 15:32:58 -0400
commit5cb84ec742fd33f78c8022863fadaa8d0d93e176 (patch)
tree1a81ca3665e6153923e40db7b0d988f8573ab59c /static/netbsd/man4/ptm.4
parenta59214f344567c037d5776879bcfc5fcc1d4d5f6 (diff)
feat: Added NetBSD man pages
Diffstat (limited to 'static/netbsd/man4/ptm.4')
-rw-r--r--static/netbsd/man4/ptm.4110
1 files changed, 110 insertions, 0 deletions
diff --git a/static/netbsd/man4/ptm.4 b/static/netbsd/man4/ptm.4
new file mode 100644
index 00000000..d53eb517
--- /dev/null
+++ b/static/netbsd/man4/ptm.4
@@ -0,0 +1,110 @@
+.\" $NetBSD: ptm.4,v 1.8 2013/12/01 00:17:14 christos Exp $
+.\"
+.\" Copyright (c) 2004 Thomas Klausner
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+.\"
+.Dd November 30, 2013
+.Dt PTM 4
+.Os
+.Sh NAME
+.Nm ptm
+.Nd pseudo-terminal multiplexor device
+.Sh SYNOPSIS
+.Cd pseudo-device pty
+.Sh DESCRIPTION
+The
+.Nm
+driver is the backend for the
+.Pa /dev/ptm
+device.
+It supports three
+.Xr ioctl 2 Ns s .
+The first is
+.Dv TIOCPTMGET ,
+which allocates a free pseudo-terminal device, sets its user ID to
+the calling user,
+.Xr revoke 2 Ns s
+it, and returns the opened file descriptors for both the master
+and the slave pseudo-terminal device to the caller in a
+.Va struct ptmget .
+This struct has the following content:
+.Bd -literal -offset indent
+struct ptmget {
+ int cfd;
+ int sfd;
+ char cn[PATH_MAX];
+ char sn[PATH_MAX];
+};
+.Ed
+.Pp
+where
+.Va cfd
+and
+.Va sfd
+contain the master resp. slave device's file descriptor and
+.Va cn
+and
+.Va sn
+the corresponding paths in the file system.
+.Pp
+The
+.Pa /dev/ptmx
+device supports two more
+.Xr ioctl 2 Ns s ,
+.Dv TIOCGRANTPT ,
+which is used by
+.Xr grantpt 3 ,
+.Dv TIOCPTSNAME ,
+which is used by
+.Xr ptsname 3 .
+.Pp
+The
+.Nm
+device is included with the pseudo-device
+.Xr pty 4 .
+It can be disabled by adding
+.Dq Cd options NO_DEV_PTM
+to the kernel configuration.
+.Sh FILES
+.Bl -tag
+.It Pa /dev/ptm
+.Nm
+access device
+.It Pa /dev/ptmx
+.Nm
+cloning device, used to implement Unix98 ptys
+.El
+.Sh SEE ALSO
+.Xr grantpt 3 ,
+.Xr openpty 3 ,
+.Xr posix_openpt 3 ,
+.Xr ptsname 3 ,
+.Xr unlockpt 3 ,
+.Xr pty 4
+.Sh HISTORY
+The
+.Pa /dev/ptm
+device appeared in
+.Ox 3.5
+and was ported to
+.Nx 3.0 .