summaryrefslogtreecommitdiff
path: root/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'service.c')
-rw-r--r--service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/service.c b/service.c
index 40a02c16e9..83a11e94f9 100644
--- a/service.c
+++ b/service.c
@@ -1413,7 +1413,7 @@ static void service_enter_signal(Service *s, ServiceState state, bool success) {
}
}
- if (sent) {
+ if (sent && (s->main_pid > 0 || s->control_pid > 0)) {
if (s->timeout_usec > 0)
if ((r = unit_watch_timer(UNIT(s), s->timeout_usec, &s->timer_watch)) < 0)
goto fail;