X-Git-Url: http://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=src%2Forphanripper.c;fp=src%2Forphanripper.c;h=4893e8f4961abeae4f07cb71a88e3a7e8ad67bfc;hp=1189df655716e949148c4bfa7844e1cb6b44a7cb;hb=c825ee4453a37dac605a9a1bc16288f3a21ccf0e;hpb=8612086e4ec97f2d2cb355b08a05e5d85689ef86 diff --git a/src/orphanripper.c b/src/orphanripper.c index 1189df6..4893e8f 100644 --- a/src/orphanripper.c +++ b/src/orphanripper.c @@ -276,12 +276,16 @@ static int spawn (char **argv, int timeout) assert (signal_chld_hit != 0); + /* Do not unset O_NONBLOCK as a stale child (the whole purpose of this + program) having open its output pty would block us in read_out. */ +#if 0 i = fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */); if (i != 0) { perror ("fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */)"); exit (EXIT_FAILURE); } +#endif while (read_out (amaster));