chiark / gitweb /
sd-event: EPOLLONESHOT only disables event reporting after an event. The fd is still...
[elogind.git] / src / libsystemd-bus / sd-event.c
index ace97dc7393767f3fbdfa22a11cdba552b2557df..b3a6c5b08ae845aed532723c60aec8590ce8b1c9 100644 (file)
@@ -1430,15 +1430,6 @@ static int process_io(sd_event *e, sd_event_source *s, uint32_t events) {
 
         s->io.revents = events;
 
-        /*
-           If this is a oneshot event source, then we added it to the
-           epoll with EPOLLONESHOT, hence we know it's not registered
-           anymore. We can save a syscall here...
-        */
-
-        if (s->enabled == SD_EVENT_ONESHOT)
-                s->io.registered = false;
-
         return source_set_pending(s, true);
 }
 
@@ -1594,7 +1585,7 @@ static int process_signal(sd_event *e, uint32_t events) {
 }
 
 static int source_dispatch(sd_event_source *s) {
-        int r;
+        int r = 0;
 
         assert(s);
         assert(s->pending || s->type == SOURCE_QUIT);