]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredumpctl: use a 3s timeout for checking units
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 26 Feb 2017 22:00:01 +0000 (17:00 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 1 Mar 2017 02:34:53 +0000 (21:34 -0500)
This is just a hint, so we shouldn't wait too long. A short timeout
helps for the case where pid1 of dbus have crashed.

src/coredump/coredumpctl.c

index 5237e2e069a63b12dbf482c8d925d908f039c922..942c970d8a15995edbf57fcd9f9e3aa8de0854ad 100644 (file)
@@ -978,7 +978,7 @@ static int check_units_active(void) {
         if (r < 0)
                 return bus_log_create_error(r);
 
-        r = sd_bus_call(bus, m, 0, &error, &reply);
+        r = sd_bus_call(bus, m, 3 * USEC_PER_SEC, &error, &reply);
         if (r < 0)
                 return log_error_errno(r, "Failed to check if any systemd-coredump@.service units are running: %s",
                                        bus_error_message(&error, r));