From add384dd4d2b96db6ace5ad9c52b1dd7553ebec2 Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Wed, 4 Apr 2018 02:14:37 -0700 Subject: [PATCH] units: use `systemctl exit` to kill the user manager (#8648) Use `systemctl --user --force exit` to implement the systemd-exit user service. This removes our dependence on an external `kill` binary and the concerns about whether they recognize SIGRTMIN+n by name or what their interpretation of SIGRTMIN is. Tested: `systemctl --user start systemd-exit.service` kills the `systemd --user` instance for my user. --- meson.build | 1 - units/user/systemd-exit.service.in | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index b53dfaa94c8..f97611c9421 100644 --- a/meson.build +++ b/meson.build @@ -563,7 +563,6 @@ splash_bmp = files('test/splash.bmp') # /usr/sbin, /sbin, and fall back to the default from middle column. progs = [['quotaon', '/usr/sbin/quotaon' ], ['quotacheck', '/usr/sbin/quotacheck' ], - ['kill', '/usr/bin/kill' ], ['kmod', '/usr/bin/kmod' ], ['kexec', '/usr/sbin/kexec' ], ['sulogin', '/usr/sbin/sulogin' ], diff --git a/units/user/systemd-exit.service.in b/units/user/systemd-exit.service.in index 9ce6f1c2acb..d69273f6b30 100644 --- a/units/user/systemd-exit.service.in +++ b/units/user/systemd-exit.service.in @@ -16,4 +16,4 @@ After=shutdown.target [Service] Type=oneshot -ExecStart=@KILL@ -s 58 $MANAGERPID +ExecStart=@SYSTEMCTL@ --user --force exit