diff options
author | 2004-01-04 23:08:09 +0000 | |
---|---|---|
committer | 2004-01-04 23:08:09 +0000 | |
commit | fc08f04e1353b5f8d4764f89e5aece5dec536ebc (patch) | |
tree | cf9e833c77b32bc3edf788a7dafd33e6e328feb3 | |
parent | In pmap_activate(), be sure to always flush the user tlb, even if we are (diff) | |
download | wireguard-openbsd-fc08f04e1353b5f8d4764f89e5aece5dec536ebc.tar.xz wireguard-openbsd-fc08f04e1353b5f8d4764f89e5aece5dec536ebc.zip |
cope with poll error
-rw-r--r-- | usr.sbin/bgpd/session.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 7ae34291e1f..99c5a63da65 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.63 2004/01/04 20:21:07 henning Exp $ */ +/* $OpenBSD: session.c,v 1.64 2004/01/04 23:08:09 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -274,10 +274,10 @@ session_main(struct bgpd_config *config, struct peer *cpeers, int pipe_m2s[2], timeout = nextaction - time(NULL); if (timeout < 0) timeout = 0; - nfds = poll(pfd, i, timeout * 1000); - /* - * what do we do on poll error? - */ + if ((nfds = poll(pfd, i, timeout * 1000)) == -1) + if (errno != EINTR) + fatal("poll error"); + if (nfds > 0 && pfd[PFD_LISTEN].revents & POLLIN) { nfds--; session_accept(sock); |