]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
xdg-autostart-generator: extend start timeout
authorLennart Poettering <lennart@poettering.net>
Thu, 8 Jun 2023 13:29:17 +0000 (15:29 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 8 Jun 2023 21:52:42 +0000 (22:52 +0100)
The current start + stop timeouts for xdg autostart files are *very*
short with 5s. On a busy system this might be too easy to hit even in
unintended case.

Apparently, the intention here was to cut the shutdown logic short.
(https://github.com/systemd/systemd/issues/27919#issuecomment-1580576178)
Let's hence stick to the very short timeout for that (under the
assumption that apps are written in a safe enough style to not lose data
if killed too early). But for starting XGD autostrat services, use our
regular timeouts.

See: #27919

src/xdg-autostart-generator/xdg-autostart-service.c

index f8466606ba3c4f2627eaaeae716ba15eaf6d0dd6..f3cf995ec2faea6739ff45e4f08ee804067bacd1 100644 (file)
@@ -639,7 +639,7 @@ int xdg_autostart_service_generate_unit(
                 "ExitType=cgroup\n"
                 "ExecStart=:%s\n"
                 "Restart=no\n"
-                "TimeoutSec=5s\n"
+                "TimeoutStopSec=5s\n"
                 "Slice=app.slice\n",
                 exec_start);