X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fservice.c;h=121ddec6ad3b72e6c8f233c066bf89154ca70f74;hb=98b2f766b24c84fc49a4df954717b1f96bbce00d;hp=6de24ec5bd320e74b400fab3f22d8ec50b6aa03d;hpb=bdd13f6be4b588568683a1ab54f421fc6a636dbb;p=elogind.git diff --git a/src/core/service.c b/src/core/service.c index 6de24ec5b..121ddec6a 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1770,6 +1770,7 @@ static int service_spawn( UNIT(s)->manager->confirm_spawn, UNIT(s)->manager->cgroup_supported, path, + manager_get_runtime_prefix(UNIT(s)->manager), UNIT(s)->id, s->watchdog_usec, s->type == SERVICE_IDLE ? UNIT(s)->manager->idle_pipe : NULL, @@ -1871,10 +1872,13 @@ static void service_enter_dead(Service *s, ServiceResult f, bool allow_restart) s->forbid_restart = false; - /* we want fresh tmpdirs in case service is started again immediately */ + /* We want fresh tmpdirs in case service is started again immediately */ exec_runtime_destroy(s->exec_runtime); s->exec_runtime = exec_runtime_unref(s->exec_runtime); + /* Also, remove the runtime directory in */ + exec_context_destroy_runtime_directory(&s->exec_context, manager_get_runtime_prefix(UNIT(s)->manager)); + /* Try to delete the pid file. At this point it will be * out-of-date, and some software might be confused by it, so * let's remove it. */