mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* EOF and ptys
@ 2005-08-01 23:57 kern1
  2005-08-02 19:04 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: kern1 @ 2005-08-01 23:57 UTC (permalink / raw)
  To: linux-kernel

I notice that when one closes a pty, rather than the master side'd read
returning 0, it's an EIO.  Seems to be this code, from n_tty.c.
	if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) {
		retval = -EIO;
		break;
	}
I'm not an expert, it might be correct, but I thought I should point it
out.

Regards,
Rich Paul

-- 
Never let 'em tell you the drug war is a total failure.  It's preventing sick
people from getting enough pain medication, isn't it?

http://radical-centrist.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: EOF and ptys
  2005-08-01 23:57 EOF and ptys kern1
@ 2005-08-02 19:04 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2005-08-02 19:04 UTC (permalink / raw)
  To: kern1; +Cc: linux-kernel

On Llu, 2005-08-01 at 19:57 -0400, kern1@rich-paul.net wrote:
> I notice that when one closes a pty, rather than the master side'd read
> returning 0, it's an EIO.  Seems to be this code, from n_tty.c.
> 	if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) {
> 		retval = -EIO;
> 		break;
> 	}
> I'm not an expert, it might be correct, but I thought I should point it
> out.

A pty close is a hangup rather than an end of file. 

Alan


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-08-02 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-01 23:57 EOF and ptys kern1
2005-08-02 19:04 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®