chiark / gitweb /
core: expose consumed CPU time per unit
[elogind.git] / src / core / scope.c
index a0e473253349e252a169dd60f24b5117145a96c0..1c3c6bb5409a381b2e5c07f1d5c0d91d0db0dcda 100644 (file)
@@ -286,6 +286,9 @@ static int scope_start(Unit *u) {
         if (!u->transient && UNIT(s)->manager->n_reloading <= 0)
                 return -ENOENT;
 
+        (void) unit_realize_cgroup(u);
+        (void) unit_reset_cpu_usage(u);
+
         r = unit_attach_pids_to_cgroup(u);
         if (r < 0)
                 return r;