event: handle arbitrary signals received during epoll gracefully

This commit is contained in:
Lennart Poettering
2013-10-16 06:15:00 +02:00
parent 72aedc1e80
commit d09d5ecda2
+1 -1
View File
@@ -1748,7 +1748,7 @@ int sd_event_run(sd_event *e, uint64_t timeout) {
m = epoll_wait(e->epoll_fd, ev_queue, EPOLL_QUEUE_MAX,
timeout == (uint64_t) -1 ? -1 : (int) ((timeout + USEC_PER_MSEC - 1) / USEC_PER_MSEC));
if (m < 0) {
r = m;
r = errno == EAGAIN || errno == EINTR ? 0 : -errno;
goto finish;
}