summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-11-27 10:19:35 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-11-27 16:14:55 +0100
commitfbb159b78990c73d27fda9b094a027aea6d43cdb (patch)
tree01af1cddc432c228ce53d8643ff9357413f2506c /src
parentnspawn: improve error message when we cannot look into a container tree due t... (diff)
downloadsystemd-fbb159b78990c73d27fda9b094a027aea6d43cdb.tar.xz
systemd-fbb159b78990c73d27fda9b094a027aea6d43cdb.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/core/service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 34d40c6950..f4919bb2b1 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;