diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2022-01-20 18:06:21 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2022-01-20 18:06:21 +0000 |
commit | a8f01c806f4beae94c7bfee6f832235c22324f61 (patch) | |
tree | 10dada3d24dfe6f2a0d17416386b51923f7f4298 /usr.sbin/bgpd/rde.c | |
parent | fa4cade53edbf1e71cee5b7fcc0039e991aea048 (diff) |
Make sure that all poll loops properly restart the poll loop on EINTR.
Also either fail hard or restart after other errors. In anycase do not
look at pollfds after an error.
OK benno@
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 65696e253e2..0df59326835 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $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> @@ -260,9 +260,9 @@ rde_main(int debug, int verbose) 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) |