summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2011-06-23 23:35:43 +0000
committerDamien Miller <djm@cvs.openbsd.org>2011-06-23 23:35:43 +0000
commit54b500a4a9ed8260419f048264105ffe18353d40 (patch)
tree7c0a6f62f24b075c8972fb201ead23f08173992e
parentffe17033706247b43690419b2085e595b68ac844 (diff)
ignore EINTR errors from poll()
-rw-r--r--usr.bin/ssh/monitor.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/monitor.c b/usr.bin/ssh/monitor.c
index 128e7be74ff..8ddc4258749 100644
--- a/usr.bin/ssh/monitor.c
+++ b/usr.bin/ssh/monitor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor.c,v 1.114 2011/06/17 21:44:30 djm Exp $ */
+/* $OpenBSD: monitor.c,v 1.115 2011/06/23 23:35:42 djm Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -462,8 +462,11 @@ monitor_read(struct monitor *pmonitor, struct mon_table *ent,
pfd[0].events = POLLIN;
pfd[1].fd = pmonitor->m_log_recvfd;
pfd[1].events = pfd[1].fd == -1 ? 0 : POLLIN;
- if (poll(pfd, pfd[1].fd == -1 ? 1 : 2, -1) == -1)
+ if (poll(pfd, pfd[1].fd == -1 ? 1 : 2, -1) == -1) {
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
fatal("%s: poll: %s", __func__, strerror(errno));
+ }
if (pfd[1].revents) {
/*
* Drain all log messages before processing next