summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-11 18:15:58 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-11 18:31:50 +0200
commitcd72bd8a4650c9e78a04cb7df1cbce697e14e512 (patch)
tree1213a9e97ea4db8e03a01db74f7de2769fb2ee47 /src/core
parentc7cc737fce8e5ba8438c1613756b48a0c2ecbb0f (diff)
core: invalidate idle pipe event source in manager_close_idle_pipe()
In all occasions when this function is called we do so anyway, so let's move this inside, to make things easier.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/manager.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 8fa2e5079e..3b64d524da 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -317,6 +317,8 @@ static int manager_watch_idle_pipe(Manager *m) {
static void manager_close_idle_pipe(Manager *m) {
assert(m);
+ m->idle_pipe_event_source = sd_event_source_unref(m->idle_pipe_event_source);
+
safe_close_pair(m->idle_pipe);
safe_close_pair(m->idle_pipe + 2);
}
@@ -936,7 +938,6 @@ Manager* manager_free(Manager *m) {
sd_event_source_unref(m->notify_event_source);
sd_event_source_unref(m->time_change_event_source);
sd_event_source_unref(m->jobs_in_progress_event_source);
- sd_event_source_unref(m->idle_pipe_event_source);
sd_event_source_unref(m->run_queue_event_source);
safe_close(m->signal_fd);
@@ -1954,7 +1955,6 @@ static int manager_dispatch_idle_pipe_fd(sd_event_source *source, int fd, uint32
m->no_console_output = m->n_on_console > 0;
- m->idle_pipe_event_source = sd_event_source_unref(m->idle_pipe_event_source);
manager_close_idle_pipe(m);
return 0;
@@ -2694,7 +2694,6 @@ void manager_check_finished(Manager *m) {
manager_flip_auto_status(m, false);
/* Notify Type=idle units that we are done now */
- m->idle_pipe_event_source = sd_event_source_unref(m->idle_pipe_event_source);
manager_close_idle_pipe(m);
/* Turn off confirm spawn now */