]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Poll errors must also drop a corefile. And we shouldn't run sockets when sockets...
authorMaria Matejka <mq@ucw.cz>
Wed, 5 Oct 2022 14:26:13 +0000 (16:26 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 5 Oct 2022 14:33:34 +0000 (16:33 +0200)
sysdep/unix/io-loop.c
sysdep/unix/io.c

index b588b73644bc8c3741f2e9932aded9b3c58dce46..5ce2d3507dc9155b67be94c0ceb8d7fe5a287883 100644 (file)
@@ -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);
index d4a3d79822b82d36026bf3561602ae954cb96aba..fb25d5d82112e287afe62dd1e9aecb611768388b 100644 (file)
@@ -2315,7 +2315,7 @@ io_loop(void)
        {
          if (errno == EINTR || errno == EAGAIN)
            continue;
-         die("poll: %m");
+         bug("poll: %m");
        }
       if (pout)
        {