Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I detect when someone opens the slave side of a pty (pseudo-terminal) in Linux?

detect linux opens Pty slave
0
10 Posted

How can I detect when someone opens the slave side of a pty (pseudo-terminal) in Linux?

0
10

– I want a reader opening the slave side of the pty to receive data written strictly after the reader opens the pty (if my multi-writing process just writes data for a while before the reader opens the slave side, the data will buffer up and eventually the writer will block and the slave reader, upon opening, will immediately get all the buffered data — this is not desirable as I want it to get only data generated in the immediate temporal vicinity) – It must be a pty, not a named pipe, socket, etc, as isatty() and tcsetattr(), etc need to be OK so that existing binaries work

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123