aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-24 16:58:05 +0000
committerRichard M. Stallman1997-07-24 16:58:05 +0000
commit215b45e94aca8732c7a32068c260cc16ada98d38 (patch)
treeb7df3a0b573093b827aa7183b5de2cccbb7ed595 /src/process.c
parent00c5fd51cdd267801622e6dabc294eb9754a8e4d (diff)
downloademacs-215b45e94aca8732c7a32068c260cc16ada98d38.tar.gz
emacs-215b45e94aca8732c7a32068c260cc16ada98d38.zip
(wait_reading_process_input): Initialize total_read.
Check for read_process_output giving back EIO.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c
index 065dacb4866..5cb882c1597 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2337,7 +2337,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
2337 if (wait_proc != 0 2337 if (wait_proc != 0
2338 && ! EQ (wait_proc->status, Qrun)) 2338 && ! EQ (wait_proc->status, Qrun))
2339 { 2339 {
2340 int nread, total_nread; 2340 int nread, total_nread = 0;
2341 2341
2342 clear_waiting_for_input (); 2342 clear_waiting_for_input ();
2343 XSETPROCESS (proc, wait_proc); 2343 XSETPROCESS (proc, wait_proc);
@@ -2346,7 +2346,14 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
2346 while (XINT (wait_proc->infd) >= 0 2346 while (XINT (wait_proc->infd) >= 0
2347 && (nread 2347 && (nread
2348 = read_process_output (proc, XINT (wait_proc->infd)))) 2348 = read_process_output (proc, XINT (wait_proc->infd))))
2349 total_nread += nread; 2349 {
2350 if (0 < nread)
2351 total_nread += nread;
2352#ifdef EIO
2353 else if (nread == -1 && EIO == errno)
2354 break;
2355#endif
2356 }
2350 if (total_nread > 0 && do_display) 2357 if (total_nread > 0 && do_display)
2351 redisplay_preserve_echo_area (); 2358 redisplay_preserve_echo_area ();
2352 2359