diff options
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 8 |
1 files changed, 5 insertions, 3 deletions
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" |
62 | RCSID("$OpenBSD: clientloop.c,v 1.63 2001/04/15 17:16:00 markus Exp $"); | 62 | RCSID("$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. */ |