Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #843
Difficulty: Medium
HTTP cannot directly support file transfer.
True or False?
Linux & Unix Commands - Search Man Pages

ptm(4) [netbsd man page]

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

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

unlockpt(3C)															      unlockpt(3C)

unlockpt - unlock a STREAMS pty master and slave pair SYNOPSIS
The passed parameter, fildes, is a file descriptor that is returned from a successful open of a master pty (pseudo-terminal) device. The function unlocks a slave pty from its associated master counterpart. It does this by clearing a lock flag so that the slave pty can be opened. For security reason, grantpt(3C) must be executed before unlockpt(3C). RETURN VALUE
Upon successful completion, the function returns a value of 0 (zero). Otherwise, it returns a value of -1. Failure may result under the following conditions: o The file descriptor specified by the fildes parameter is not an open file descriptor. o The file descriptor specified by the fildes parameter is not associated with a STREAMS pty master device. EXAMPLES
The following example shows how is typically used. ... AUTHOR
was developed by HP and OSF. SEE ALSO
open(2), grantpt(3C), ptsname(3C), ptm(7), pts(7), ptem(7). unlockpt(3C)

Featured Tech Videos