Re: Out of ptys

Stephen Rothwell (Stephen.Rothwell@canb.auug.org.au)
Thu, 27 Aug 1998 14:32:54 +1000 (EST)


> From: "Richard B. Johnson" <root@chaos.analogic.com>
> Subject: Re: Out of ptys
> Date: Thu, 27 Aug 1998 13:28:04 +1000
>
> On Wed, 26 Aug 1998, Alan Cox wrote:
>
> > > I read your first comment on this. Your demo programs don't
> > > relate at all to the problem.
> >
> > You keep claiming things don't work. Im just going to sit here proving
> > they do. If you play this game for long enough we might even find a real
> > library bug
>
> Well here it is. You chose what the "correct" behavior should be. I'll
> except anything. However, both STDERR_FILENO and STDOUT_FILENO had
> better function the same or there is a library problem.

Except that, of course, stderr is unbuffered and stdout is line buffered.
I would expect an unbuffered stream to noticed the (out of band) closure
of its file descriptor before a buffered one.

I concede that there is still something wrong here as stdout should
be line buffered when it refers to a terminal and yet the error is not
discovered in the fprintf (which should of course flush the stream due
to the newline). Mind you, I have been mistake before ... ;-)

Cheers,
Stephen Stephen.Rothwell@canb.auug.org.au

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html