[systemd-commits] src/libsystemd

Tom Gundersen tomegun at kemper.freedesktop.org
Mon Aug 25 15:22:16 PDT 2014


 src/libsystemd/sd-event/sd-event.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 6d148a842ebb04a9a9bc2853e167a9d8eddf8cd8
Author: Tom Gundersen <teg at jklm.no>
Date:   Tue Aug 26 00:22:06 2014 +0200

    sd-event: sd_event_prepare - stay in PREPARED if sd_event_wait() indicates that no sources are pending

diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index a71962c..32777e3 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -2256,7 +2256,11 @@ _public_ int sd_event_prepare(sd_event *e) {
 
 pending:
         e->state = SD_EVENT_PREPARED;
-        return sd_event_wait(e, 0);
+        r = sd_event_wait(e, 0);
+        if (r == 0)
+                e->state = SD_EVENT_PREPARED;
+
+        return r;
 }
 
 _public_ int sd_event_wait(sd_event *e, uint64_t timeout) {



More information about the systemd-commits mailing list