]> git.eshelyaron.com Git - emacs.git/commitdiff
(wait_reading_process_input): When exiting because
authorRichard M. Stallman <rms@gnu.org>
Mon, 16 Jun 1997 06:24:22 +0000 (06:24 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 16 Jun 1997 06:24:22 +0000 (06:24 +0000)
the process WAIT_PROC has terminated, first read all its output.

src/process.c

index a9da5b1f72555dee05b844a07e98bd686c5c6a73..bebfba778433f77d7da2a24d5bfb52cc4c3c14d4 100644 (file)
@@ -2305,7 +2305,17 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
       if (wait_proc != 0
          && ! EQ (wait_proc->status, Qrun))
        {
+         int nread, total_nread;
+
          clear_waiting_for_input ();
+         XSETPROCESS (proc, wait_proc);
+
+         /* Read data from the process, until we exhaust it.  */
+         while (nread = read_process_output (proc, XINT (wait_proc->infd)))
+           total_nread += nread;
+         if (total_nread > 0 && do_display)
+           redisplay_preserve_echo_area ();
+
          break;
        }