summaryrefslogtreecommitdiff
path: root/units
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 /units
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 'units')
-rw-r--r--units/console-getty.service.m4.in5
-rw-r--r--units/console-shell.service.m4.in5
-rw-r--r--units/emergency.service.in5
-rw-r--r--units/getty@.service.m45
-rw-r--r--units/rescue.service.m4.in6
-rw-r--r--units/serial-getty@.service.m45
6 files changed, 7 insertions, 24 deletions
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