Re: Out of ptys

Richard B. Johnson (root@chaos.analogic.com)
Wed, 26 Aug 1998 08:08:45 -0400 (EDT)


On Wed, 26 Aug 1998, Alan Cox wrote:

> > before spawing a child, was creating children such as telnet, etc., that
> > could continue to write to "stdout" after the link was disconnected and
> > the original socket closed.
>
> glibc gets this right too
>
> #include <stdio.h>
>
> int main(int argc, char *argv[])
> {
> close(1);
> if(printf("Hello")==-1)
> perror("printf");
> if(fflush(stdout)==-1)
> perror("fflush");
> }
>
> % ./doh
> fflush: Bad file descriptor
>
>

I read your first comment on this. Your demo programs don't
relate at all to the problem.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.115 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
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