From 82659fd7571bda0f3dce9755b89a23c411d53dda Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 30 Jul 2013 01:54:59 +0200 Subject: core: optionally send SIGHUP in addition to the configured kill signal This is useful to fake session ends for processes like shells. --- units/console-getty.service.m4.in | 5 +---- units/console-shell.service.m4.in | 5 +---- units/emergency.service.in | 5 +---- units/getty@.service.m4 | 5 +---- units/rescue.service.m4.in | 6 ++---- units/serial-getty@.service.m4 | 5 +---- 6 files changed, 7 insertions(+), 24 deletions(-) (limited to 'units') diff --git a/units/console-getty.service.m4.in b/units/console-getty.service.m4.in index 0426050ee8..2fd9dd8478 100644 --- a/units/console-getty.service.m4.in +++ b/units/console-getty.service.m4.in @@ -25,10 +25,7 @@ TTYReset=yes TTYVHangup=yes KillMode=process IgnoreSIGPIPE=no - -# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -# terminates cleanly. -KillSignal=SIGHUP +SendSIGHUP=yes [Install] WantedBy=getty.target diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in index dac2ac212b..3f4904a0ee 100644 --- a/units/console-shell.service.m4.in +++ b/units/console-shell.service.m4.in @@ -25,10 +25,7 @@ StandardOutput=inherit StandardError=inherit KillMode=process IgnoreSIGPIPE=no - -# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -# terminates cleanly. -KillSignal=SIGHUP +SendSIGHUP=yes [Install] WantedBy=getty.target diff --git a/units/emergency.service.in b/units/emergency.service.in index 442f0e0ee6..94c090f654 100644 --- a/units/emergency.service.in +++ b/units/emergency.service.in @@ -25,7 +25,4 @@ StandardOutput=inherit StandardError=inherit KillMode=process IgnoreSIGPIPE=no - -# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -# terminates cleanly. -KillSignal=SIGHUP +SendSIGHUP=yes diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 index 7853652009..253da85f8e 100644 --- a/units/getty@.service.m4 +++ b/units/getty@.service.m4 @@ -38,14 +38,11 @@ TTYVHangup=yes TTYVTDisallocate=yes KillMode=process IgnoreSIGPIPE=no +SendSIGHUP=yes # Unset locale for the console getty since the console has problems # displaying some internationalized messages. Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION= -# Some login implementations ignore SIGTERM, so we send SIGHUP -# instead, to ensure that login terminates cleanly. -KillSignal=SIGHUP - [Install] WantedBy=getty.target diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in index 269797a12e..552ef8981b 100644 --- a/units/rescue.service.m4.in +++ b/units/rescue.service.m4.in @@ -25,7 +25,5 @@ StandardInput=tty-force StandardOutput=inherit StandardError=inherit KillMode=process - -# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -# terminates cleanly. -KillSignal=SIGHUP +IgnoreSIGPIPE=no +SendSIGHUP=yes diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 index 5e16963e92..e32c6b7aff 100644 --- a/units/serial-getty@.service.m4 +++ b/units/serial-getty@.service.m4 @@ -32,7 +32,4 @@ TTYReset=yes TTYVHangup=yes KillMode=process IgnoreSIGPIPE=no - -# Some login implementations ignore SIGTERM, so we send SIGHUP -# instead, to ensure that login terminates cleanly. -KillSignal=SIGHUP +SendSIGHUP=yes -- cgit v1.2.3-54-g00ecf