X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fswap.c;h=0a1cc80936837868a4140141b16d0e7a7ccb2e31;hb=609c3029076da1ba423673161e5d0fc82ccca6b6;hp=13e12ad67a1ea268938cc7dc8c8abd488fdcd2e6;hpb=f10af76de5e6589e35ed620c75f3f6eb02cdf345;p=elogind.git diff --git a/src/core/swap.c b/src/core/swap.c index 13e12ad67..0a1cc8093 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -627,6 +627,7 @@ static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) { exec_params.confirm_spawn = UNIT(s)->manager->confirm_spawn; exec_params.cgroup_supported = UNIT(s)->manager->cgroup_supported; exec_params.cgroup_path = UNIT(s)->cgroup_path; + exec_params.cgroup_delegate = s->cgroup_context.delegate; exec_params.runtime_prefix = manager_get_runtime_prefix(UNIT(s)->manager); exec_params.unit_id = UNIT(s)->id; @@ -687,7 +688,8 @@ static void swap_enter_signal(Swap *s, SwapState state, SwapResult f) { r = unit_kill_context( UNIT(s), &s->kill_context, - state != SWAP_ACTIVATING_SIGTERM && state != SWAP_DEACTIVATING_SIGTERM, + (state != SWAP_ACTIVATING_SIGTERM && state != SWAP_DEACTIVATING_SIGTERM) ? + KILL_KILL : KILL_TERMINATE, -1, s->control_pid, false);