From fbb159b78990c73d27fda9b094a027aea6d43cdb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 27 Nov 2024 10:19:35 +0100 Subject: [PATCH] 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. --- src/core/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3