[BACK]Return to ptm.4 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / man / man4

File: [cvs.NetBSD.org] / src / share / man / man4 / ptm.4 (download)

Revision 1.6, Thu May 8 15:34:21 2008 UTC (15 years, 10 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, uebayasi-xip-base7, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-premerge-20091211, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-premerge-20101231, matt-mips64-base2, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, tls-maxphys
Changes since 1.5: +1 -3 lines

2-clause my license.

.\"        $NetBSD: ptm.4,v 1.6 2008/05/08 15:34:21 wiz 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 12, 2005
.Dt PTM 4
.Os
.Sh NAME
.Nm ptm
.Nd pseudo-terminal multiplexor device
.Sh SYNOPSIS
.Cd pseudo-device pty Op Ar count
.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[16];
        char    sn[16];
};
.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 .