sd-event: return 1 in sd_event_run() when we hit EINTR

That way we can distuingish timeouts from EINTR
This commit is contained in:
Lennart Poettering
2013-12-19 22:18:39 +01:00
parent 30b5275ac7
commit ff0031069f
+1 -1
View File
@@ -1986,7 +1986,7 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
m = epoll_wait(e->epoll_fd, ev_queue, ev_queue_max,
timeout == (uint64_t) -1 ? -1 : (int) ((timeout + USEC_PER_MSEC - 1) / USEC_PER_MSEC));
if (m < 0) {
r = errno == EAGAIN || errno == EINTR ? 0 : -errno;
r = errno == EAGAIN || errno == EINTR ? 1 : -errno;
goto finish;
}