Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pseudoterminal]

The tag has no usage guidance.

0
votes
0answers
46 views

Is it possible to change the process on the master or slave side of a pseudoterminal pair?

Given a pair of pseudoterminal master and slave, and two processes communicating via them, is it possible to change the process on the master side to another process? is it possible to change the ...
0
votes
1answer
109 views

create pty and connect it to a serial port /dev/ttyUSB0

Problem: I have two Linux machines connected with a serial interface. I use ppp to communicate between them (I have to since it is a project requirement). Communication speed is at 9600 bits/s. I ...
1
vote
1answer
218 views

Why are `/dev/ptmx` and `/dev/pts/ptmx` not device files?

https://unix.stackexchange.com/a/492304/674 says On Linux, using devpts, there is no master device file. The process on the master end uses a file descriptor, which it gets by opening ptmx, but ...
0
votes
2answers
182 views

How can we find out the pseudoterminal master and slave from each other? [duplicate]

A pseudoterminal has a pair of master and slave. How can we find out the master device file from a slave device file (e.g. /etc/pts/3)? I only find /dev/ptmx and /dev/pts/ptmx, but they can't be ...
1
vote
1answer
46 views

When closing a terminal emulator window, is the last file descriptor of a slave side or master side closed?

The Linux Programming Interface says SIGHUP is sent to the controlling process of a terminal When a terminal window is closed on a workstation. This occurs because the last open file descriptor ...
3
votes
1answer
117 views

Is a virtual console running as a process and implemented based on pseudoterminal?

Linux has 7 virtual consoles, which correspond to 7 device files /dev/tty[n]. Is a virtual console running as a process, just like a terminal emulator? (I am not sure. It seems a virtual console is ...
1
vote
1answer
107 views

read(2) blocking behaviour changes when pts is closed resulting in read() returning error: -1 (EIO)

I'm trying to figure out how I can reliably loop a read on a pt master I have. I open the ptmx, grant and unlock it as per usual: * ptmx stuff */ /* get the master (ptmx) */ int32_t masterfd = open("/...
1
vote
1answer
202 views

How do I use jpnevulator to capture and log the serial traffic between an application and hardware serial port?

OK, I've been googling for hours so I obviously have not been able to understand the answers to the various questions that have already been asked about this subject. I am hoping that, by asking the ...
1
vote
1answer
70 views

Is pseudo terminals ( unlockpt / TIOCSPTLCK ) a security feature?

After having opened the master part of a pseude-terminal int fd_pseudo_term_master = open("/dev/ptmx",O_RDWR); there is the file /dev/pts/[NUMBER] created, representing the slave part of he pseudo-...
-1
votes
2answers
255 views

documentation on ptmx and pts [closed]

I am want to stream a linux terminal to my own program, and as far as I understand this is done by opening /dev/ptmx to start a new pts, I have tested this and this does indeed work (it creates a new ...
2
votes
1answer
107 views

How does a terminal emulator read and write with a physical terminal device?

In a diagram from APUE, Where is a physical terminal device or virtual console for the terminal emulator read and write with? what process open, read and write with some physical terminal device or ...
7
votes
1answer
317 views

what relations are between my current controlling terminal and `/dev/tty`?

On Lubuntu 18.04, I run a shell in lxterminal. Its controlling terminal is the current pseudoterminal slave: $ tty /dev/pts/2 I would like to know what relations are between my current controlling ...
1
vote
1answer
40 views

Does pseudoterminal transfer byte stream or message?

From The Linux Programming Interface under "data transfer" under "communication", we have "byte stream", "message" and "pseudoterminal". Does pseudoterminal belong to byte stream instead, just like ...