summaryrefslogtreecommitdiff
path: root/ssh-agent.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-07-04 23:10:49 +1000
committerDamien Miller <djm@mindrot.org>2008-07-04 23:10:49 +1000
commitd8968adb5faef58508bb5e7dab7cdbaf5b0e90d5 (patch)
tree33357b9d71f2d3e72b8383e2b3771773914425f4 /ssh-agent.c
parentb01bac109bd2fc6b3093fe4aeb31a125be8f2a4e (diff)
- (djm) [atomicio.c channels.c clientloop.c defines.h includes.h]
[packet.c scp.c serverloop.c sftp-client.c ssh-agent.c ssh-keyscan.c] [sshd.c] Explicitly handle EWOULDBLOCK wherever we handle EAGAIN, on some platforms (HP nonstop) it is a distinct errno; bz#1467 reported by sconeu AT yahoo.com; ok dtucker@
Diffstat (limited to 'ssh-agent.c')
-rw-r--r--ssh-agent.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ssh-agent.c b/ssh-agent.c
index b1c65fab6..9123cfe6b 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -961,7 +961,8 @@ after_select(fd_set *readset, fd_set *writeset)
961 buffer_ptr(&sockets[i].output), 961 buffer_ptr(&sockets[i].output),
962 buffer_len(&sockets[i].output)); 962 buffer_len(&sockets[i].output));
963 if (len == -1 && (errno == EAGAIN || 963 if (len == -1 && (errno == EAGAIN ||
964 errno == EINTR)) 964 errno == EINTR ||
965 errno == EWOULDBLOCK))
965 continue; 966 continue;
966 break; 967 break;
967 } while (1); 968 } while (1);
@@ -975,7 +976,8 @@ after_select(fd_set *readset, fd_set *writeset)
975 do { 976 do {
976 len = read(sockets[i].fd, buf, sizeof(buf)); 977 len = read(sockets[i].fd, buf, sizeof(buf));
977 if (len == -1 && (errno == EAGAIN || 978 if (len == -1 && (errno == EAGAIN ||
978 errno == EINTR)) 979 errno == EINTR ||
980 errno == EWOULDBLOCK))
979 continue; 981 continue;
980 break; 982 break;
981 } while (1); 983 } while (1);