diff options
author | Damien Miller <djm@mindrot.org> | 2008-07-04 23:10:49 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2008-07-04 23:10:49 +1000 |
commit | d8968adb5faef58508bb5e7dab7cdbaf5b0e90d5 (patch) | |
tree | 33357b9d71f2d3e72b8383e2b3771773914425f4 /packet.c | |
parent | b01bac109bd2fc6b3093fe4aeb31a125be8f2a4e (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 'packet.c')
-rw-r--r-- | packet.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -956,7 +956,8 @@ packet_read_seqnr(u_int32_t *seqnr_p) | |||
956 | if ((ret = select(connection_in + 1, setp, NULL, | 956 | if ((ret = select(connection_in + 1, setp, NULL, |
957 | NULL, timeoutp)) >= 0) | 957 | NULL, timeoutp)) >= 0) |
958 | break; | 958 | break; |
959 | if (errno != EAGAIN && errno != EINTR) | 959 | if (errno != EAGAIN && errno != EINTR && |
960 | errno != EWOULDBLOCK) | ||
960 | break; | 961 | break; |
961 | if (packet_timeout_ms == -1) | 962 | if (packet_timeout_ms == -1) |
962 | continue; | 963 | continue; |
@@ -1475,7 +1476,7 @@ packet_write_poll(void) | |||
1475 | if (len > 0) { | 1476 | if (len > 0) { |
1476 | len = write(connection_out, buffer_ptr(&output), len); | 1477 | len = write(connection_out, buffer_ptr(&output), len); |
1477 | if (len <= 0) { | 1478 | if (len <= 0) { |
1478 | if (errno == EAGAIN) | 1479 | if (errno == EAGAIN || errno == EWOULDBLOCK) |
1479 | return; | 1480 | return; |
1480 | else | 1481 | else |
1481 | fatal("Write failed: %.100s", strerror(errno)); | 1482 | fatal("Write failed: %.100s", strerror(errno)); |
@@ -1516,7 +1517,8 @@ packet_write_wait(void) | |||
1516 | if ((ret = select(connection_out + 1, NULL, setp, | 1517 | if ((ret = select(connection_out + 1, NULL, setp, |
1517 | NULL, timeoutp)) >= 0) | 1518 | NULL, timeoutp)) >= 0) |
1518 | break; | 1519 | break; |
1519 | if (errno != EAGAIN && errno != EINTR) | 1520 | if (errno != EAGAIN && errno != EINTR && |
1521 | errno != EWOULDBLOCK) | ||
1520 | break; | 1522 | break; |
1521 | if (packet_timeout_ms == -1) | 1523 | if (packet_timeout_ms == -1) |
1522 | continue; | 1524 | continue; |