summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-07-05 09:40:56 +1000
committerDamien Miller <djm@mindrot.org>2008-07-05 09:40:56 +1000
commitd874fa517be97bdd57b631fd409c337761f1ab46 (patch)
treea9692a56ad7bc8b39d24346dc283d82ace06faa4
parent20d16947190d17f9ed8db983bee6cb7bd20722b5 (diff)
- OpenBSD CVS Sync
- djm@cvs.openbsd.org 2008/07/04 23:08:25 [packet.c] handle EINTR in packet_write_poll()l ok dtucker@
-rw-r--r--ChangeLog6
-rw-r--r--packet.c13
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index c1df7b87e..6cd833b32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@
5 - (djm) [atomicio.c configure.ac] Disable poll() fallback in atomiciov for 5 - (djm) [atomicio.c configure.ac] Disable poll() fallback in atomiciov for
6 Tru64. readv doesn't seem to be a comparable object there. 6 Tru64. readv doesn't seem to be a comparable object there.
7 bz#1386, patch from dtucker@ ok me 7 bz#1386, patch from dtucker@ ok me
8 - (djm) OpenBSD CVS Sync
9 - djm@cvs.openbsd.org 2008/07/04 23:08:25
10 [packet.c]
11 handle EINTR in packet_write_poll()l ok dtucker@
8 12
920080704 1320080704
10 - (dtucker) OpenBSD CVS Sync 14 - (dtucker) OpenBSD CVS Sync
@@ -4578,4 +4582,4 @@
4578 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4582 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4579 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4583 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4580 4584
4581$Id: ChangeLog,v 1.5060 2008/07/04 23:36:58 djm Exp $ 4585$Id: ChangeLog,v 1.5061 2008/07/04 23:40:56 djm Exp $
diff --git a/packet.c b/packet.c
index ff22be68f..1dda4a294 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.155 2008/06/13 09:44:36 deraadt Exp $ */ 1/* $OpenBSD: packet.c,v 1.156 2008/07/04 23:08:25 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1475,16 +1475,19 @@ packet_write_poll(void)
1475 1475
1476 if (len > 0) { 1476 if (len > 0) {
1477 len = write(connection_out, buffer_ptr(&output), len); 1477 len = write(connection_out, buffer_ptr(&output), len);
1478 if (len <= 0) { 1478 if (len == -1) {
1479 if (errno == EAGAIN || errno == EWOULDBLOCK) 1479 if (errno == EINTR || errno == EAGAIN ||
1480 errno == EWOULDBLOCK)
1480 return; 1481 return;
1481 else 1482 fatal("Write failed: %.100s", strerror(errno));
1482 fatal("Write failed: %.100s", strerror(errno));
1483 } 1483 }
1484 if (len == 0)
1485 fatal("Write connection closed");
1484 buffer_consume(&output, len); 1486 buffer_consume(&output, len);
1485 } 1487 }
1486} 1488}
1487 1489
1490
1488/* 1491/*
1489 * Calls packet_write_poll repeatedly until all pending output data has been 1492 * Calls packet_write_poll repeatedly until all pending output data has been
1490 * written. 1493 * written.