From: Richard M. Stallman Date: Thu, 24 Jul 1997 16:58:05 +0000 (+0000) Subject: (wait_reading_process_input): Initialize total_read. X-Git-Tag: emacs-20.1~1000 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=215b45e94aca8732c7a32068c260cc16ada98d38;p=emacs.git (wait_reading_process_input): Initialize total_read. Check for read_process_output giving back EIO. --- 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) if (wait_proc != 0 && ! EQ (wait_proc->status, Qrun)) { - int nread, total_nread; + int nread, total_nread = 0; clear_waiting_for_input (); XSETPROCESS (proc, wait_proc); @@ -2346,7 +2346,14 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) while (XINT (wait_proc->infd) >= 0 && (nread = read_process_output (proc, XINT (wait_proc->infd)))) - total_nread += nread; + { + if (0 < nread) + total_nread += nread; +#ifdef EIO + else if (nread == -1 && EIO == errno) + break; +#endif + } if (total_nread > 0 && do_display) redisplay_preserve_echo_area ();