summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2013-03-01 14:47:46 +0100
committerMichal Schmidt <mschmidt@redhat.com>2013-03-01 18:38:22 +0100
commit9e9e2b722cf796b58e959cd174d87ce0ec0bc996 (patch)
tree698ccd6a05f2477f3445b33caa80ab91d0901e8c /src/core/manager.c
parent945d1442ed5d6cf50b0d0a45fe482130f74f2997 (diff)
core: fix running jobs counters after reload/reexec
All active units will call unit_notify() during coldplug, so we just make sure we're counting from zero again and get the correct result for n_on_console. For n_running_jobs we likewise reset it to zero and then count the running jobs as we encounter them in deserialization.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 5527e9d429..42423985bc 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -678,6 +678,9 @@ static void manager_clear_jobs_and_units(Manager *m) {
assert(hashmap_isempty(m->jobs));
assert(hashmap_isempty(m->units));
+
+ m->n_on_console = 0;
+ m->n_running_jobs = 0;
}
void manager_free(Manager *m) {