Re: Inconsistency between PTY read() return values

From: Ed Schouten
Date: Wed Apr 08 2009 - 13:56:24 EST


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? If you take the code I
mentioned and modify it to close the master device and perform a read on
the TTY, it will return 0.

--
Ed Schouten <ed@xxxxxxxxxxx>

Attachment: pgp00000.pgp
Description: PGP signature