summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/sd-event.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-19 21:38:52 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-19 22:18:39 +0100
commitff0031069ffeb0ccda209297b6b39c4786ac770b (patch)
treed12a1983ef2d55a01de0a6e35a17094a06ad1469 /src/libsystemd-bus/sd-event.c
parent30b5275ac775264fa94490ac88c1e35bc6b90b40 (diff)
sd-event: return 1 in sd_event_run() when we hit EINTR
That way we can distuingish timeouts from EINTR
Diffstat (limited to 'src/libsystemd-bus/sd-event.c')
-rw-r--r--src/libsystemd-bus/sd-event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-bus/sd-event.c b/src/libsystemd-bus/sd-event.c
index 727528bb3c..a1baac52aa 100644
--- a/src/libsystemd-bus/sd-event.c
+++ b/src/libsystemd-bus/sd-event.c
@@ -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;
}