diff options
| author | Richard M. Stallman <rms@gnu.org> | 1997-06-16 06:24:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1997-06-16 06:24:22 +0000 |
| commit | 7ce63188c972f4bd803bbb75c3e85f909a292ea0 (patch) | |
| tree | 27d0326194a77a12243bd286845a8d5b9b6406c1 | |
| parent | 78943c8ae6da85e0a234b13745676aa5cace0993 (diff) | |
| download | emacs-7ce63188c972f4bd803bbb75c3e85f909a292ea0.tar.gz | |
(wait_reading_process_input): When exiting because
the process WAIT_PROC has terminated, first read all its output.
| -rw-r--r-- | src/process.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index a9da5b1f725..bebfba77843 100644 --- a/src/process.c +++ b/src/process.c @@ -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; } |
