Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ptm(4) [netbsd man page]

PTM(4)							   BSD Kernel Interfaces Manual 						    PTM(4)

NAME
ptm -- pseudo-terminal multiplexor device SYNOPSIS
pseudo-device pty [count] DESCRIPTION
The ptm driver is the backend for the /dev/ptm device. It supports three ioctl(2)s. The first is TIOCPTMGET, which allocates a free pseudo- terminal device, sets its user ID to the calling user, revoke(2)s it, and returns the opened file descriptors for both the master and the slave pseudo-terminal device to the caller in a struct ptmget. This struct has the following content: struct ptmget { int cfd; int sfd; char cn[16]; char sn[16]; }; where cfd and sfd contain the master resp. slave device's file descriptor and cn and sn the corresponding paths in the file system. The /dev/ptmx device supports two more ioctl(2)s, TIOCGRANTPT, which is used by grantpt(3), TIOCPTSNAME, which is used by ptsname(3). The ptm device is included with the pseudo-device pty(4). It can be disabled by adding ``options NO_DEV_PTM'' to the kernel configuration. FILES
/dev/ptm ptm access device /dev/ptmx ptm cloning device, used to implement Unix98 ptys SEE ALSO
grantpt(3), openpty(3), posix_openpt(3), ptsname(3), unlockpt(3), pty(4) HISTORY
The /dev/ptm device appeared in OpenBSD 3.5 and was ported to NetBSD 3.0. BSD
November 12, 2005 BSD

Check Out this Related Man Page

ptsname(3C)															       ptsname(3C)

NAME
ptsname() - get the pathname of a slave pty (pseudo-terminal) SYNOPSIS
Obsolescent Interfaces Remarks supports STREAMS pty (see ptm(7) and pts(7)), and non-STREAMS pty (see pty(7)) which have different device naming conventions. Notice that the STREAMS pty, being an optional feature, is supported only when it is installed on the system. is useful only on systems that follow the insf(1M) naming conventions for pty (STREAMS and non-STREAMS). DESCRIPTION
The passed parameter, fildes, is a file descriptor of an opened master pty. generates the name of the slave pty corresponding to this mas- ter pty. This means that their minor numbers will be identical. Obsolescent Interfaces gets the pathname of a slave pty (pseudo-terminal). RETURN VALUE
Upon successful completion, returns a string containing the full path name of a slave pty. Otherwise, a NULL pointer is returned. The return value is pointed to static data area which is overwritten with each call to so it should be copied if it is to be saved. ERRORS
fails and returns a NULL pointer under the following conditions: o File descriptor does not refer to an open master pty. o Request falls outside pty name-space. o Pty device naming conventions have not been followed. o failed to find a match. WARNINGS
is obsolescent interface supported only for compatibility with existing DCE applications. New multi-threaded applications should use EXAMPLES
The following example shows how is typically used for non-STREAMS pty to obtain the pathname of the slave pty corresponding to a master pty obtained through a pty clone open. ... The following example shows how is typically used on obtaining the pathname of the STREAMS slave pty corresponding to a STREAMS master pty. ... AUTHOR
and were developed by HP and OSF. SEE ALSO
insf(1M), devnm(3), pty(7), grantpt(3C), unlockpt(3C), ptm(7), pts(7), ptem(7), ldterm(7). ptsname(3C)
Man Page