aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Kastrup2003-05-17 20:03:22 +0000
committerDavid Kastrup2003-05-17 20:03:22 +0000
commit47714441724d5579d844c9ef4730dda10f02d2c9 (patch)
tree12302650ec5fb521e9bb08928ea63e8890248406 /src
parent78f521833ff58baa69baccc24b625cb0ace7cd63 (diff)
downloademacs-47714441724d5579d844c9ef4730dda10f02d2c9.tar.gz
emacs-47714441724d5579d844c9ef4730dda10f02d2c9.zip
(read_process_output): Back out change from 2003-03-09.
Diffstat (limited to 'src')
-rw-r--r--src/process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c
index 6dc052e716b..9790b7d29a6 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4463,18 +4463,18 @@ read_process_output (proc, channel)
4463 if (DATAGRAM_CHAN_P (channel)) 4463 if (DATAGRAM_CHAN_P (channel))
4464 { 4464 {
4465 int len = datagram_address[channel].len; 4465 int len = datagram_address[channel].len;
4466 nbytes = recvfrom (channel, chars + carryover, readmax, 4466 nbytes = recvfrom (channel, chars + carryover, readmax - carryover,
4467 0, datagram_address[channel].sa, &len); 4467 0, datagram_address[channel].sa, &len);
4468 } 4468 }
4469 else 4469 else
4470#endif 4470#endif
4471 if (proc_buffered_char[channel] < 0) 4471 if (proc_buffered_char[channel] < 0)
4472 nbytes = emacs_read (channel, chars + carryover, readmax); 4472 nbytes = emacs_read (channel, chars + carryover, readmax - carryover);
4473 else 4473 else
4474 { 4474 {
4475 chars[carryover] = proc_buffered_char[channel]; 4475 chars[carryover] = proc_buffered_char[channel];
4476 proc_buffered_char[channel] = -1; 4476 proc_buffered_char[channel] = -1;
4477 nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1); 4477 nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1 - carryover);
4478 if (nbytes < 0) 4478 if (nbytes < 0)
4479 nbytes = 1; 4479 nbytes = 1;
4480 else 4480 else