-/* $OpenBSD: bgpd.c,v 1.239 2021/07/20 12:07:46 claudio Exp $ */
+/* $OpenBSD: bgpd.c,v 1.240 2022/01/20 18:06:20 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
if (timeout < 0 || timeout > MAX_TIMEOUT)
timeout = MAX_TIMEOUT;
- if (poll(pfd, npfd, timeout * 1000) == -1)
+ if (poll(pfd, npfd, timeout * 1000) == -1) {
if (errno != EINTR) {
log_warn("poll error");
quit = 1;
}
+ continue;
+ }
if (handle_pollfd(&pfd[PFD_PIPE_SESSION], ibuf_se) == -1) {
log_warnx("main: Lost connection to SE");
-/* $OpenBSD: rde.c,v 1.532 2021/08/09 08:15:34 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.533 2022/01/20 18:06:20 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
timeout = 0;
if (poll(pfd, i, timeout) == -1) {
- if (errno != EINTR)
- fatal("poll error");
- continue;
+ if (errno == EINTR)
+ continue;
+ fatal("poll error");
}
if (handle_pollfd(&pfd[PFD_PIPE_MAIN], ibuf_main) == -1)
-/* $OpenBSD: rtr.c,v 1.4 2021/09/01 12:39:52 claudio Exp $ */
+/* $OpenBSD: rtr.c,v 1.5 2022/01/20 18:06:20 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
i += rtr_poll_events(pfd + i, pfd_elms - i, &timeout);
if (poll(pfd, i, timeout * 1000) == -1) {
- if (errno != EINTR)
- fatal("poll error");
- continue;
+ if (errno == EINTR)
+ continue;
+ fatal("poll error");
}
if (handle_pollfd(&pfd[PFD_PIPE_MAIN], ibuf_main) == -1)
-/* $OpenBSD: session.c,v 1.424 2021/09/03 07:48:24 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.425 2022/01/20 18:06:20 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
timeout = 1;
if (timeout < 0)
timeout = 0;
- if (poll(pfd, i, timeout * 1000) == -1)
- if (errno != EINTR)
- fatal("poll error");
+ if (poll(pfd, i, timeout * 1000) == -1) {
+ if (errno == EINTR)
+ continue;
+ fatal("poll error");
+ }
/*
* If we previously saw fd exhaustion, we stop accept()