naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
9fc0f6
From adc1b71d84ab8b618c623749f43dc6350d75de6b Mon Sep 17 00:00:00 2001
9fc0f6
From: Michal Sekletar <msekleta@redhat.com>
9fc0f6
Date: Tue, 4 Mar 2014 17:00:54 +0100
9fc0f6
Subject: [PATCH] logind: given that we can now relatively safely shutdown
9fc0f6
 sessions copes without working cgroup empty notifications there's no need to
9fc0f6
 set the stop timeout of sessions scopes low
9fc0f6
9fc0f6
Based-on: a50df72b37ce2a7caf7775c70d18c3f9504b9e80
9fc0f6
---
9fc0f6
 src/login/logind-dbus.c | 11 +----------
9fc0f6
 1 file changed, 1 insertion(+), 10 deletions(-)
9fc0f6
9fc0f6
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
9fc0f6
index a68e9b4..6cabb7b 100644
9fc0f6
--- a/src/login/logind-dbus.c
9fc0f6
+++ b/src/login/logind-dbus.c
9fc0f6
@@ -2549,10 +2549,9 @@ int manager_start_scope(
9fc0f6
                 DBusError *error,
9fc0f6
                 char **job) {
9fc0f6
 
9fc0f6
-        const char *timeout_stop_property = "TimeoutStopUSec", *send_sighup_property = "SendSIGHUP", *pids_property = "PIDs", *after_property = "After";
9fc0f6
+        const char *send_sighup_property = "SendSIGHUP", *pids_property = "PIDs", *after_property = "After";
9fc0f6
         _cleanup_dbus_message_unref_ DBusMessage *m = NULL, *reply = NULL;
9fc0f6
         DBusMessageIter iter, sub, sub2, sub3, sub4;
9fc0f6
-        uint64_t timeout = 500 * USEC_PER_MSEC;
9fc0f6
         dbus_bool_t send_sighup = true;
9fc0f6
         const char *fail = "fail";
9fc0f6
         uint32_t u;
9fc0f6
@@ -2632,14 +2631,6 @@ int manager_start_scope(
9fc0f6
          * stop timeout for sessions, so that we don't wait
9fc0f6
          * forever. */
9fc0f6
 
9fc0f6
-        if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2) ||
9fc0f6
-            !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &timeout_stop_property) ||
9fc0f6
-            !dbus_message_iter_open_container(&sub2, DBUS_TYPE_VARIANT, "t", &sub3) ||
9fc0f6
-            !dbus_message_iter_append_basic(&sub3, DBUS_TYPE_UINT64, &timeout) ||
9fc0f6
-            !dbus_message_iter_close_container(&sub2, &sub3) ||
9fc0f6
-            !dbus_message_iter_close_container(&sub, &sub2))
9fc0f6
-                return log_oom();
9fc0f6
-
9fc0f6
         /* Make sure that the session shells are terminated with
9fc0f6
          * SIGHUP since bash and friends tend to ignore SIGTERM */
9fc0f6
         if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2) ||