# HG changeset patch # User Richard M. Stallman # Date 869763485 0 # Node ID 84b78d90cd453a551c8919ba22071fcdd63adb34 # Parent 7f491075707a3ff74b79031a8d78bd62aab6d38f (wait_reading_process_input): Initialize total_read. Check for read_process_output giving back EIO. diff -r 7f491075707a -r 84b78d90cd45 src/process.c --- a/src/process.c Thu Jul 24 16:57:19 1997 +0000 +++ b/src/process.c Thu Jul 24 16:58:05 1997 +0000 @@ -2337,7 +2337,7 @@ 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 @@ 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 ();