PTY(4FREEBSD) - Linux man page online | Special files

BSD-style and System V-style compatibility pseudo-terminal driver.

August 20, 2008
PTY(4) BSD Kernel Interfaces Manual PTY(4)


pty — BSD-style and System V-style compatibility pseudo-terminal driver


device pty


The pty driver provides support for the traditional BSD naming scheme that was used for accessing pseudo-terminals. When the device /dev/ptyXX is being opened, a new terminal shall be created with the pts(4) driver. A device node for this terminal shall be created, which has the name /dev/ttyXX. The pty driver also provides a cloning System V /dev/ptmx device. New code should not try to allocate pseudo-terminals using this interface. It is only pro‐ vided for compatibility with older C libraries that tried to open such devices when posix_openpt(2) was being called.


The BSD-style compatibility pseudo-terminal driver uses the following device names: /dev/pty[l-sL-S][0-9a-v] Pseudo-terminal master devices. /dev/tty[l-sL-S][0-9a-v] Pseudo-terminal slave devices. /dev/ptmx Control device, returns a file descriptor to a new master pseudo- terminal when opened.




posix_openpt(2), pts(4), tty(4)


A pseudo-terminal driver appeared in 4.2BSD.


Unlike previous implementations, the master and slave device nodes are destroyed when the PTY becomes unused. A call to stat(2) on a nonexistent master device will already cause a new master device node to be created. The master device can only be destroyed by opening and closing it. The pty driver cannot be unloaded, because it cannot determine if it is being used.
BSD August 20, 2008 BSD
This manual Reference Other manuals
pty(4freebsd) referred by if_tap(4freebsd) | if_tun(4freebsd) | in.rlogind(8) | in.telnetd(8) | kterm(1x) | libexpect(3) | mac_biba(4freebsd) | mac_mls(4freebsd) | pts(4freebsd) | snp(4freebsd) | sshd_config(5) | tap(4freebsd) | telnetd(8) | tmate(1) | tmux(1) | tty(4freebsd) | tun(4freebsd) | urxvt(1) | vkbd(4freebsd) | xiterm+thai(1)
refer to posix_openpt(2freebsd) | pts(4) | stat(2) | tty(4)
Download raw manual
Index BSD Kernel Interfaces Manual (+773) BSD (+3984) № 4 (+981)
Go top