mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-26 19:03:48 +01:00
daemon: EINTR from kevent(2) is not a fatal error
Simply resume waiting for events rather than exiting if we took a signal
here.
This at least fixes running programs under daemon(8) in the face of
suspend/resume, which I suspect hits us with a spurious EINTR rather
than a signal anyways.
Reported and tested by: manu
Fixes: 8935a39932
("daemon: use kqueue for all events")
This commit is contained in:
parent
c2eae5c39a
commit
494e7dfdbe
@ -427,6 +427,8 @@ daemon_eventloop(struct daemon_state *state)
|
||||
ret = kevent(kq, NULL, 0, &event, 1, NULL);
|
||||
switch (ret) {
|
||||
case -1:
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
err(EXIT_FAILURE, "kevent wait");
|
||||
case 0:
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user