summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-10-05 16:26:13 +0200
committerMaria Matejka <mq@ucw.cz>2022-10-05 16:33:34 +0200
commite1701128bfdc737e04fe4bd4609020d5f93853c6 (patch)
treef8e31973ff102c888c76cf02f11cb9acad986504 /sysdep
parent4d687d7aecb2bc4b695d26418bc761acb1d15c76 (diff)
Poll errors must also drop a corefile. And we shouldn't run sockets when sockets have changed
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/io-loop.c6
-rw-r--r--sysdep/unix/io.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/sysdep/unix/io-loop.c b/sysdep/unix/io-loop.c
index b588b736..5ce2d350 100644
--- a/sysdep/unix/io-loop.c
+++ b/sysdep/unix/io-loop.c
@@ -367,7 +367,7 @@ sockets_fire(struct birdloop *loop)
continue;
if (pfd->revents & POLLNVAL)
- die("poll: invalid fd %d", pfd->fd);
+ bug("poll: invalid fd %d", pfd->fd);
if (pfd->revents & POLLIN)
while (e && *psk && (*psk)->rx_hook)
@@ -602,7 +602,7 @@ birdloop_main(void *arg)
{
if (errno == EINTR || errno == EAGAIN)
goto try;
- die("poll: %m");
+ bug("poll: %m");
}
birdloop_enter(loop);
@@ -615,7 +615,7 @@ birdloop_main(void *arg)
loop_begin = current_time();
- if (rv)
+ if (rv && !loop->poll_changed)
sockets_fire(loop);
atomic_exchange_explicit(&loop->ping_sent, 0, memory_order_acq_rel);
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index d4a3d798..fb25d5d8 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -2315,7 +2315,7 @@ io_loop(void)
{
if (errno == EINTR || errno == EAGAIN)
continue;
- die("poll: %m");
+ bug("poll: %m");
}
if (pout)
{