summaryrefslogtreecommitdiffstats
path: root/src/core/kill.c
diff options
context:
space:
mode:
authorJon Ringle <jringle@gridpoint.com>2018-07-20 17:22:43 +0200
committerLennart Poettering <lennart@poettering.net>2018-07-23 13:44:54 +0200
commitfbb48d4c66ada1ea7ffb3bdd03cf5e6a3579b600 (patch)
tree789d2fe31cf70c24d71cd135824724e079e6d559 /src/core/kill.c
parentcheck nobody user/group validity only when not cross compiling (diff)
downloadsystemd-fbb48d4c66ada1ea7ffb3bdd03cf5e6a3579b600.tar.xz
systemd-fbb48d4c66ada1ea7ffb3bdd03cf5e6a3579b600.zip
Make final kill signal configurable
Usecase is to allow changing the final kill from SIGKILL to SIGQUIT which should create a core dump useful for debugging why the service didn't stop with the SIGTERM
Diffstat (limited to 'src/core/kill.c')
-rw-r--r--src/core/kill.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/kill.c b/src/core/kill.c
index 929eebfe37..73fa556d13 100644
--- a/src/core/kill.c
+++ b/src/core/kill.c
@@ -9,6 +9,7 @@ void kill_context_init(KillContext *c) {
assert(c);
c->kill_signal = SIGTERM;
+ c->final_kill_signal = SIGKILL;
c->send_sigkill = true;
c->send_sighup = false;
}
@@ -21,10 +22,12 @@ void kill_context_dump(KillContext *c, FILE *f, const char *prefix) {
fprintf(f,
"%sKillMode: %s\n"
"%sKillSignal: SIG%s\n"
+ "%sFinalKillSignal: SIG%s\n"
"%sSendSIGKILL: %s\n"
"%sSendSIGHUP: %s\n",
prefix, kill_mode_to_string(c->kill_mode),
prefix, signal_to_string(c->kill_signal),
+ prefix, signal_to_string(c->final_kill_signal),
prefix, yes_no(c->send_sigkill),
prefix, yes_no(c->send_sighup));
}