Pseudoterminal files

Pseudoterminals (pseudo-TTYs) are used by users and applications to gain access to the shell. A pseudo-TTY is a pair of character special files, a master file and a corresponding slave file. The master file is used by a networking application such as OMVS or rlogin. The corresponding slave file is used by the shell or the user's process to read and write terminal data.

The convention for the names of the pseudo-TTY pair is:
  • /dev/ptypNNNN for the master (major 1)
  • /dev/ttypNNNN for the slave (major 2)

The NNNN is between 0000 and one less than the MAXPTYS value in the BPXPRMxx member.

When a user enters the TSO/E OMVS command or logs in using rlogin or telnet to initialize a shell, the system selects an available pair of these files. The pair represents the connection. The maximum number of pairs is 10000. You can specify an appropriate number of pairs in the MAXPTYS parameter; see MAXPTYS.

The default controlling terminal can be accessed through the /dev/tty special file (major 3). This file is defined the first time the system is IPLed.

Pseudo-TTY files are dynamically created by the system when they are first referenced.