summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--clientloop.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ea589346c..f5d9863ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
9 - markus@cvs.openbsd.org 2001/04/17 08:14:01 9 - markus@cvs.openbsd.org 2001/04/17 08:14:01
10 [sshconnect1.c] 10 [sshconnect1.c]
11 check for key!=NULL, thanks to costa 11 check for key!=NULL, thanks to costa
12 - markus@cvs.openbsd.org 2001/04/17 09:52:48
13 [clientloop.c]
14 handle EINTR/EAGAIN on read; ok deraadt@
12 15
1320010416 1620010416
14 - OpenBSD CVS Sync 17 - OpenBSD CVS Sync
@@ -5134,4 +5137,4 @@
5134 - Wrote replacements for strlcpy and mkdtemp 5137 - Wrote replacements for strlcpy and mkdtemp
5135 - Released 1.0pre1 5138 - Released 1.0pre1
5136 5139
5137$Id: ChangeLog,v 1.1132 2001/04/17 18:08:15 mouring Exp $ 5140$Id: ChangeLog,v 1.1133 2001/04/17 18:09:42 mouring Exp $
diff --git a/clientloop.c b/clientloop.c
index 95c00f343..2709ce356 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.63 2001/04/15 17:16:00 markus Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.64 2001/04/17 09:52:48 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -625,6 +625,8 @@ client_process_input(fd_set * readset)
625 if (FD_ISSET(fileno(stdin), readset)) { 625 if (FD_ISSET(fileno(stdin), readset)) {
626 /* Read as much as possible. */ 626 /* Read as much as possible. */
627 len = read(fileno(stdin), buf, sizeof(buf)); 627 len = read(fileno(stdin), buf, sizeof(buf));
628 if (len < 0 && (errno == EAGAIN || errno == EINTR))
629 return; /* we'll try again later */
628 if (len <= 0) { 630 if (len <= 0) {
629 /* 631 /*
630 * Received EOF or error. They are treated 632 * Received EOF or error. They are treated
@@ -678,7 +680,7 @@ client_process_output(fd_set * writeset)
678 len = write(fileno(stdout), buffer_ptr(&stdout_buffer), 680 len = write(fileno(stdout), buffer_ptr(&stdout_buffer),
679 buffer_len(&stdout_buffer)); 681 buffer_len(&stdout_buffer));
680 if (len <= 0) { 682 if (len <= 0) {
681 if (errno == EAGAIN) 683 if (errno == EINTR || errno == EAGAIN)
682 len = 0; 684 len = 0;
683 else { 685 else {
684 /* 686 /*
@@ -701,7 +703,7 @@ client_process_output(fd_set * writeset)
701 len = write(fileno(stderr), buffer_ptr(&stderr_buffer), 703 len = write(fileno(stderr), buffer_ptr(&stderr_buffer),
702 buffer_len(&stderr_buffer)); 704 buffer_len(&stderr_buffer));
703 if (len <= 0) { 705 if (len <= 0) {
704 if (errno == EAGAIN) 706 if (errno == EINTR || errno == EAGAIN)
705 len = 0; 707 len = 0;
706 else { 708 else {
707 /* EOF or error, but can't even print error message. */ 709 /* EOF or error, but can't even print error message. */