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

From: Magnus Ringman <bmr_at_google.com>
Date: Tue, 26 Sep 2006 20:21:17 +0200
On 9/26/06, Brandon S. Allbery KF8NH <allbery_at_ece.cmu.edu> wrote:
>
> On Sep 26, 2006, at 14:09 , Magnus Ringman wrote:
>
> > Methinks Sir has it the wrong way around!
> > Hangup on a hardware device -doesn't- void a program's access to the
> > device.  It just (optionally) sends the process a SIGHUP.  That is why
> > somebody (iirc, for SunOS < 5) invented vhangup(2) as a means for a
> > new session owner to insure it was the only process using the
> > terminal.
>
> I think you misunderstood:  yes, physically you do not lose access,
> but for security reasons *logically you should*, and that is why
> vhangup() was invented.  And, this being done, it is also a
> reasonable --- and, more to the point, consistent --- model for what
> happens when a pty slave loses its master (which *is* equivalent to
> physically losing access).

Ah, yes - my bad.  We agree!
My poor brain stem objected to the use of SIGHUP for losing master, on
grounds that a hangup is a perfetly valid terminal event.
Invalidating the fd is the important point.

Magnus
Received on Tue Sep 26 2006 - 16:21:27 UTC

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