summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index bb8003c67..a166fed2e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.114 2011/06/17 21:44:30 djm Exp $ */ 1/* $OpenBSD: monitor.c,v 1.115 2011/06/23 23:35:42 djm Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -554,8 +554,11 @@ monitor_read(struct monitor *pmonitor, struct mon_table *ent,
554 pfd[0].events = POLLIN; 554 pfd[0].events = POLLIN;
555 pfd[1].fd = pmonitor->m_log_recvfd; 555 pfd[1].fd = pmonitor->m_log_recvfd;
556 pfd[1].events = pfd[1].fd == -1 ? 0 : POLLIN; 556 pfd[1].events = pfd[1].fd == -1 ? 0 : POLLIN;
557 if (poll(pfd, pfd[1].fd == -1 ? 1 : 2, -1) == -1) 557 if (poll(pfd, pfd[1].fd == -1 ? 1 : 2, -1) == -1) {
558 if (errno == EINTR || errno == EAGAIN)
559 continue;
558 fatal("%s: poll: %s", __func__, strerror(errno)); 560 fatal("%s: poll: %s", __func__, strerror(errno));
561 }
559 if (pfd[1].revents) { 562 if (pfd[1].revents) {
560 /* 563 /*
561 * Drain all log messages before processing next 564 * Drain all log messages before processing next