diff options
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 2fddc44fe3..ae473d05c2 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -40,8 +40,6 @@ #include "sd-daemon.h" #include "sd-messages.h" -#include "manager.h" -#include "transaction.h" #include "hashmap.h" #include "macro.h" #include "strv.h" @@ -65,14 +63,17 @@ #include "bus-common-errors.h" #include "bus-error.h" #include "bus-util.h" -#include "dbus.h" -#include "dbus-unit.h" -#include "dbus-job.h" -#include "dbus-manager.h" #include "bus-kernel.h" #include "time-util.h" #include "process-util.h" #include "terminal-util.h" +#include "signal-util.h" +#include "dbus.h" +#include "dbus-unit.h" +#include "dbus-job.h" +#include "dbus-manager.h" +#include "manager.h" +#include "transaction.h" /* Initial delay and the interval for printing status messages about running jobs */ #define JOBS_IN_PROGRESS_WAIT_USEC (5*USEC_PER_SEC) @@ -1204,7 +1205,7 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove log_unit_debug(unit, "Trying to enqueue job %s/%s/%s", unit->id, job_type_to_string(type), job_mode_to_string(mode)); - job_type_collapse(&type, unit); + type = job_type_collapse(type, unit); tr = transaction_new(mode == JOB_REPLACE_IRREVERSIBLY); if (!tr) @@ -2703,6 +2704,15 @@ void manager_check_finished(Manager *m) { assert(m); + if (m->n_reloading > 0) + return; + + /* Verify that we are actually running currently. Initially + * the exit code is set to invalid, and during operation it is + * then set to MANAGER_OK */ + if (m->exit_code != MANAGER_OK) + return; + if (hashmap_size(m->jobs) > 0) { if (m->jobs_in_progress_event_source) |