]> git.ipfire.org Git - thirdparty/systemd.git/commit
manager: don't ever busy loop when we get a notification message we can't process
authorLennart Poettering <lennart@poettering.net>
Fri, 7 Oct 2016 10:08:51 +0000 (12:08 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 7 Oct 2016 10:08:51 +0000 (12:08 +0200)
commitc55ae51e77e1fc56fde7bc3466dd2021ff3856cb
treed25b394f22ddd77bb162ceb470ca12ab924ad09b
parentfd9b26c6f208dda8e7235c7c793df2b5f162d015
manager: don't ever busy loop when we get a notification message we can't process

If the kernel doesn't permit us to dequeue/process an incoming notification
datagram message it's still better to stop processing the notification messages
altogether than to enter a busy loop where we keep getting notified but can't
do a thing about it.

With this change, manager_dispatch_notify_fd() behaviour is changed like this:

- if an error indicating a spurious wake-up is seen on recvmsg(), ignore it
  (EAGAIN/EINTR)

- if any other error is seen on recvmsg() propagate it, thus disabling
  processing of further wakeups

- if any error is seen on later code in the function, warn about it but do not
  propagate it, as in this cas we're not going to busy loop as the offending
  message is already dequeued.
src/core/manager.c