diff options
author | Damien Miller <djm@mindrot.org> | 2011-08-06 06:15:15 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2011-08-06 06:15:15 +1000 |
commit | 7741ce8bd2d0aef8aae0c2406eb51b617f1165fe (patch) | |
tree | 35d992393486ecb269fdcf16671490a366002b40 /monitor.c | |
parent | cd5e52ee784f0ff67b60ffeeab335ed64df688a4 (diff) |
- djm@cvs.openbsd.org 2011/06/23 23:35:42
[monitor.c]
ignore EINTR errors from poll()
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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> @@ -554,8 +554,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 |