Do not unset O_NONBLOCK as a stale child (the whole purpose of this
authorjkratoch <>
Fri, 18 Dec 2009 09:49:25 +0000 (09:49 +0000)
committerjkratoch <>
Fri, 18 Dec 2009 09:49:25 +0000 (09:49 +0000)
program) having open its output pty would block us in read_out.

src/orphanripper.c

index 1189df6..4893e8f 100644 (file)
@@ -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));