What do you think ?: How should pseundo terminals behave ...
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Tue Sep 26 10:33:31 PDT 2006
On Sep 26, 2006, at 13:29 , Magnus Ringman wrote:
> 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".
I think that in many circumstances (and, as you note, implemented in
other OSes), the correct behavior *is* to treat hangup as "backing
device no longer exists" --- an older session should not leak into a
newer one, it is a potential security hole and certainly a potential
source of confusion. And if hardware ttys do it, I should think
virtual ones should also do so for consistency.
--
brandon s. allbery [linux,solaris,freebsd,perl] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the freebsd-current
mailing list