Re: Inconsistency between PTY read() return values

From: Alan Cox
Date: Wed Apr 08 2009 - 14:08:21 EST


On Wed, 8 Apr 2009 19:56:03 +0200
Ed Schouten <ed@xxxxxxxxxxx> wrote:

> Hi Alan,
>
> * Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
> > I would argue that TTYs do behave this way. We treat the disconnect as a
> > hang up event. BSD sees it as EOF, Linux as hangup.
>
> Would you mind explaining me the difference? I thought a modem
> disconnect implies an end-of-file condition?

A modem disconnect is a hang up which is quite different to an EOF and is
effectively a security barrier as well (existing users of the tty port
lose access to it aka revoke())
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/