From: Lennart Poettering Date: Wed, 27 Nov 2024 09:19:35 +0000 (+0100) Subject: service: don't second guess invocation mode again X-Git-Tag: v257-rc3~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fbb159b78990c73d27fda9b094a027aea6d43cdb;p=thirdparty%2Fsystemd.git service: don't second guess invocation mode again let's just check the debug invocation boolean, and not recheck the restart mode again. It's mostly redundant (because the boolean should not have been become true if the restart mode was not set accordingly). Moreover, i think we might want to eventually allow a manual way to enable debug invocation mode, and hence this pointless checking would become a problem. Also, we never check the restart mode again in other cases, hence we shouldn't here either. --- diff --git a/src/core/service.c b/src/core/service.c index 34d40c69508..f4919bb2b1b 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1879,7 +1879,7 @@ static int service_spawn_internal( } } - if (s->restart_mode == SERVICE_RESTART_MODE_DEBUG && UNIT(s)->debug_invocation) { + if (UNIT(s)->debug_invocation) { char *t = strdup("DEBUG_INVOCATION=1"); if (!t) return -ENOMEM;