aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorGerd Moellmann1999-10-07 11:37:40 +0000
committerGerd Moellmann1999-10-07 11:37:40 +0000
commite1b37c346847589fbcb83a4bf1bab5f07401c8c4 (patch)
tree36a033b111fccdb3c5fe67b44678e274520cc446 /src/process.c
parent78cc5c64e4e5c61f5fc7d5db5eb08ae923efa3ad (diff)
downloademacs-e1b37c346847589fbcb83a4bf1bab5f07401c8c4.tar.gz
emacs-e1b37c346847589fbcb83a4bf1bab5f07401c8c4.zip
(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.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c
index cc658400dbb..2cb1dd908ce 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2541,16 +2541,27 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
2541 XSETPROCESS (proc, wait_proc); 2541 XSETPROCESS (proc, wait_proc);
2542 2542
2543 /* Read data from the process, until we exhaust it. */ 2543 /* Read data from the process, until we exhaust it. */
2544 while (XINT (wait_proc->infd) >= 0 2544 while (XINT (wait_proc->infd) >= 0)
2545 && (nread
2546 = read_process_output (proc, XINT (wait_proc->infd))))
2547 { 2545 {
2546 nread = read_process_output (proc, XINT (wait_proc->infd));
2547
2548 if (nread == 0)
2549 break;
2550
2548 if (0 < nread) 2551 if (0 < nread)
2549 total_nread += nread; 2552 total_nread += nread;
2550#ifdef EIO 2553#ifdef EIO
2551 else if (nread == -1 && EIO == errno) 2554 else if (nread == -1 && EIO == errno)
2552 break; 2555 break;
2553#endif 2556#endif
2557#ifdef EAGAIN
2558 else if (nread == -1 && EAGAIN == errno)
2559 break;
2560#endif
2561#ifdef EWOULDBLOCK
2562 else if (nread == -1 && EWOULDBLOCK == errno)
2563 break;
2564#endif
2554 } 2565 }
2555 if (total_nread > 0 && do_display) 2566 if (total_nread > 0 && do_display)
2556 redisplay_preserve_echo_area (); 2567 redisplay_preserve_echo_area ();