Mercurial > emacs
diff src/process.c @ 18267:29c37882ee1f
(wait_reading_process_input): When exiting because
the process WAIT_PROC has terminated, first read all its output.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Mon, 16 Jun 1997 06:24:22 +0000 |
| parents | 2f1f942f25ca |
| children | 3835d79f8978 |
line wrap: on
line diff
--- a/src/process.c Sun Jun 15 23:05:19 1997 +0000 +++ b/src/process.c Mon Jun 16 06:24:22 1997 +0000 @@ -2305,7 +2305,17 @@ 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; }
