Re: What do you think ?: How should pseundo terminals behave ...

From: Magnus Ringman <bmr_at_google.com>
Date: Tue, 26 Sep 2006 19:29:02 +0200
On 9/26/06, Brandon S. Allbery KF8NH <allbery_at_ece.cmu.edu> wrote:
>
> 3a) Hangup all processes attached to the client and switch them to
> some kind of "dead" inode (which could be a fixed entity since all
> operations on it except close() fail).  (Don't real ttys do this?)

-1.
Yes and no.  ttys do that on an actual hangup (when a hardware hangup
happens), however PTYs are intended to allow emulating the full
terminal line semantics, including hangup.  Imo the case of "pty
master side disappearing" is equivalent to "backing device (hardware)
no longer exists", not "remote end hung up".

Some OSes have a vhangup(2) call, which when called on an open device
will send a hangup to all controlled processes, possibly also
substituting a dead fd.

One idea might be to allow pty pairs a "generation" concept, and have
slave side lose the fd when the master side is close

Magnus
Received on Tue Sep 26 2006 - 15:29:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:00 UTC