ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
Blob Blame History Raw
From 29e00416bbef0e8073373fde25347d139749d949 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Mon, 27 Jan 2014 17:54:29 +0000
Subject: [PATCH] Temporary work around for slow shutdown due to unterminated
 user sessions.

---
 units/user@.service.in | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/units/user@.service.in b/units/user@.service.in
index 3f8b59d..a7e0584 100644
--- a/units/user@.service.in
+++ b/units/user@.service.in
@@ -14,5 +14,12 @@ User=%I
 PAMName=systemd-user
 Type=notify
 ExecStart=-@rootlibexecdir@/systemd --user
+# Apply same work around as apache's httpd until issues with user session
+# killing is fixed (currently problem is that the kill issued by systemd --user
+# is itself killed by systemd (PID1) before it can work which can lead to slow
+# shutdowns
+# http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/16363
+ExecStop=/bin/kill -TERM ${MAINPID}
+KillSignal=SIGCONT
 Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/dbus/user_bus_socket
 Slice=user-%i.slice