# HG changeset patch # User Gerd Moellmann # Date 939296260 0 # Node ID 8bd3e6fbf42fbfd402c9fd41a8c852f4eec36abf # Parent 08f4200f6cbfd98f8135cf240bf250b75a36657c (wait_reading_process_input): When trying to suck input from one process, for accept-process-output, exit that loop if we get EAGAIN or EWOULDBLOCK. diff -r 08f4200f6cbf -r 8bd3e6fbf42f src/process.c --- a/src/process.c Thu Oct 07 11:32:09 1999 +0000 +++ b/src/process.c Thu Oct 07 11:37:40 1999 +0000 @@ -2541,16 +2541,27 @@ XSETPROCESS (proc, wait_proc); /* Read data from the process, until we exhaust it. */ - while (XINT (wait_proc->infd) >= 0 - && (nread - = read_process_output (proc, XINT (wait_proc->infd)))) + while (XINT (wait_proc->infd) >= 0) { + nread = read_process_output (proc, XINT (wait_proc->infd)); + + if (nread == 0) + break; + if (0 < nread) total_nread += nread; #ifdef EIO else if (nread == -1 && EIO == errno) break; #endif +#ifdef EAGAIN + else if (nread == -1 && EAGAIN == errno) + break; +#endif +#ifdef EWOULDBLOCK + else if (nread == -1 && EWOULDBLOCK == errno) + break; +#endif } if (total_nread > 0 && do_display) redisplay_preserve_echo_area ();