From e93bc5a61f8589f01e779ab2b5ffc7c7ca072074 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 24 Apr 2010 02:05:42 +0200 Subject: [PATCH] service: don't wait for any child unless we no its pid --- service.c | 2 +- socket.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service.c b/service.c index 40a02c16e..83a11e94f 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; diff --git a/socket.c b/socket.c index 6d15cfe0e..755bc598d 100644 --- a/socket.c +++ b/socket.c @@ -667,7 +667,7 @@ static void socket_enter_signal(Socket *s, SocketState state, bool success) { } } - if (sent) { + if (sent && s->control_pid > 0) { if ((r = unit_watch_timer(UNIT(s), s->timeout_usec, &s->timer_watch)) < 0) goto fail; -- 2.30.2