1 .\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
4 .\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE)
5 .\" Redistribute and revise at will.
8 .TH PTS 4 2002-10-09 "Linux" "Linux Programmer's Manual"
10 ptmx, pts \- pseudoterminal master and slave
14 is a character file with major number 5 and
15 minor number 2, usually of mode 0666 and owner.group of root.root.
16 It is used to create a pseudoterminal master and slave pair.
21 descriptor for a pseudoterminal master (PTM),
22 and a pseudoterminal slave (PTS) device is created in the
25 Each file descriptor obtained by opening
27 is an independent PTM with its own associated PTS, whose path can
28 be found by passing the descriptor to
31 Before opening the pseudoterminal slave, you must pass the master's file
37 Once both the pseudoterminal master and slave are open, the slave provides
38 processes with an interface that is identical to that of a real terminal.
40 Data written to the slave is presented on the master descriptor as input.
41 Data written to the master is presented to the slave as input.
43 In practice, pseudoterminals are used for implementing terminal emulators
46 in which data read from the pseudoterminal master is interpreted by the
47 application in the same way
48 a real terminal would interpret the data, and for implementing remote-login
51 in which data read from the pseudoterminal master is sent across the network
52 to a client program that is connected to a terminal or terminal emulator.
54 Pseudoterminals can also be used to send input to programs that normally
55 refuse to read input from pipes (such as
63 The Linux support for the above (known as UNIX 98 pseudoterminal naming)
66 filesystem, that should be mounted on
69 Before this UNIX 98 scheme, master pseudoterminals were called
70 .IR /dev/ptyp0 ", ..."
71 and slave pseudoterminals
72 .IR /dev/ttyp0 ", ..."
73 and one needed lots of preallocated device nodes.