if (UNIT_IS_INACTIVE_OR_FAILED(os) != UNIT_IS_INACTIVE_OR_FAILED(ns)) {
ExecContext *ec = unit_get_exec_context(u);
if (ec && exec_context_may_touch_console(ec)) {
- /* XXX The counter may get out of sync if the admin edits
- * TTY-related unit file properties and issues a daemon-reload
- * while the unit is active. No big deal though, because
- * it influences only the printing of boot/shutdown
- * status messages. */
if (UNIT_IS_INACTIVE_OR_FAILED(ns))
m->n_on_console--;
else
return r;
}
+ if (j->state == JOB_RUNNING)
+ u->manager->n_running_jobs++;
+
r = job_install_deserialized(j);
if (r < 0) {
hashmap_remove(u->manager->jobs, UINT32_TO_PTR(j->id));