Questions tagged [pty]

Pseudoterminals (also spelled “pseudotty” or “PTY”) are pseudo-devices used with ttys whose emulators run in userspace. Use the [tty] tag for broad (text terminal)-related questions, and the [console] tag for terminal devices pertaining to the system console.

A pseudoterminal (also spelled “pseudotty” or “PTY”) is a pair of character pseudo-devices.

One of which, the slave, provides access to (emulated) text terminal for programs (console applications) and can have attached processes. Respective special files lie in /dev/pts/ (in modern Unix98-compliant OSes) or have /dev/tty[p-za-e][0-9a-f] names for compatibility with older software.

Second, the master, is an endpoint for the terminal emulator that runs in userspace. Respective special files is either one /dev/ptmx multiplexer (in modern Unix98-compliant OSes) or have /dev/pty[p-za-e][0-9a-f] names for compatibility with older software.

123 questions
3
votes
3 answers

Wrapper to allocate a pty (opposite to nohup)

I have a command foo that (for reasons we need not go into) needs to have a pty allocated, i.e. foo succeeds but nohup foo fails. What is the easiest way to allocate a pty when there is not one? screen -D -m foo seems like overkill, an does not…
abligh
  • 397
2
votes
2 answers

Does the master device appear just like a standard terminal to the driver program?

From the Linux Programming Interface The key point about a pseudoterminal is that the slave device appears just like a standard terminal. All of the operations that can be applied to a terminal device can also be applied to a …
Tim
  • 101,790