summaryrefslogtreecommitdiff
path: root/src/core/kill.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-07-30 01:54:59 +0200
committerLennart Poettering <lennart@poettering.net>2013-07-30 01:54:59 +0200
commit82659fd7571bda0f3dce9755b89a23c411d53dda (patch)
tree00ea49ad7be58cc9630f249ad8c7def09939daf7 /src/core/kill.c
parent5a4555ba6bc8ea086823fb71cb1cb92d4ec087a2 (diff)
core: optionally send SIGHUP in addition to the configured kill signal
This is useful to fake session ends for processes like shells.
Diffstat (limited to 'src/core/kill.c')
-rw-r--r--src/core/kill.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/kill.c b/src/core/kill.c
index 0775653f73..ea947c23ae 100644
--- a/src/core/kill.c
+++ b/src/core/kill.c
@@ -29,6 +29,7 @@ void kill_context_init(KillContext *c) {
c->kill_signal = SIGTERM;
c->send_sigkill = true;
+ c->send_sighup = false;
}
void kill_context_dump(KillContext *c, FILE *f, const char *prefix) {
@@ -40,10 +41,12 @@ void kill_context_dump(KillContext *c, FILE *f, const char *prefix) {
fprintf(f,
"%sKillMode: %s\n"
"%sKillSignal: SIG%s\n"
- "%sSendSIGKILL: %s\n",
+ "%sSendSIGKILL: %s\n"
+ "%sSendSIGHUP: %s\n",
prefix, kill_mode_to_string(c->kill_mode),
prefix, signal_to_string(c->kill_signal),
- prefix, yes_no(c->send_sigkill));
+ prefix, yes_no(c->send_sigkill),
+ prefix, yes_no(c->send_sighup));
}
static const char* const kill_mode_table[_KILL_MODE_MAX] = {