Revert problematic change to wait_reading_process_output.
authorGlenn Morris <rgm@gnu.org>
Sat, 29 Oct 2011 00:12:02 +0000 (20:12 -0400)
committerGlenn Morris <rgm@gnu.org>
Sat, 29 Oct 2011 00:12:02 +0000 (20:12 -0400)
* src/process.c (wait_reading_process_output): Revert 2009-08-30 change.
Not clear what it was for, and it causes various bugs.  (Bug#9839)

src/ChangeLog
src/process.c

index fad9b4f..5ebd288 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-29  Glenn Morris  <rgm@gnu.org>
+
+       * process.c (wait_reading_process_output): Revert 2009-08-30 change.
+       Not clear what it was for, and it causes various bugs.  (Bug#9839)
+
 2011-10-28  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
index dc37ec5..c316139 100644 (file)
@@ -4856,16 +4856,11 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd,
                 It can't hurt.  */
              else if (nread == -1 && errno == EIO)
                {
-                 /* Clear the descriptor now, so we only raise the
-                    signal once.  Don't do this if `process' is only
-                    a pty.  */
-                 if (XPROCESS (proc)->pid != -2)
-                   {
-                     FD_CLR (channel, &input_wait_mask);
-                     FD_CLR (channel, &non_keyboard_wait_mask);
+                 /* Clear the descriptor now, so we only raise the signal once.  */
+                 FD_CLR (channel, &input_wait_mask);
+                 FD_CLR (channel, &non_keyboard_wait_mask);
 
-                     kill (getpid (), SIGCHLD);
-                   }
+                 kill (getpid (), SIGCHLD);
                }
 #endif /* HAVE_PTYS */
              /* If we can detect process termination, don't consider the process