lkml.org 
[lkml]   [1998]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Out of ptys
Date
> 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



-
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

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:1.036 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site