X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=job.c;h=1d59bcb27f7d99504a3bfbfed9b305e0eca32214;hp=c1b00714ec995de43c366abb872dc53654ed9a5e;hb=07b0b134d3076fe223d6e15959b6081a74b56792;hpb=4139c1b2729f88991159b9affa2ebf3e4eb904a0 diff --git a/job.c b/job.c index c1b00714e..1d59bcb27 100644 --- a/job.c +++ b/job.c @@ -58,8 +58,10 @@ void job_free(Job *j) { if (j->installed) { bus_job_send_removed_signal(j); - if (j->unit->meta.job == j) + if (j->unit->meta.job == j) { j->unit->meta.job = NULL; + unit_add_to_gc_queue(j->unit); + } hashmap_remove(j->manager->jobs, UINT32_TO_PTR(j->id)); j->installed = false; @@ -148,8 +150,8 @@ void job_dump(Job *j, FILE*f, const char *prefix) { assert(f); fprintf(f, - "%s→ Job %u:\n" - "%s\tAction: %s → %s\n" + "%s-> Job %u:\n" + "%s\tAction: %s -> %s\n" "%s\tState: %s\n" "%s\tForced: %s\n", prefix, j->id, @@ -462,7 +464,7 @@ int job_finish_and_invalidate(Job *j, bool success) { /* Patch restart jobs so that they become normal start jobs */ if (success && (j->type == JOB_RESTART || j->type == JOB_TRY_RESTART)) { - log_debug("Converting job %s/%s → %s/%s", + log_debug("Converting job %s/%s -> %s/%s", j->unit->meta.id, job_type_to_string(j->type), j->unit->meta.id, job_type_to_string(JOB_START)); @@ -575,7 +577,8 @@ DEFINE_STRING_TABLE_LOOKUP(job_type, JobType); static const char* const job_mode_table[_JOB_MODE_MAX] = { [JOB_FAIL] = "fail", - [JOB_REPLACE] = "replace" + [JOB_REPLACE] = "replace", + [JOB_ISOLATE] = "isolate" }; DEFINE_STRING_TABLE_LOOKUP(job_mode, JobMode);