diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-24 02:05:42 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-24 02:05:42 +0200 |
commit | e93bc5a61f8589f01e779ab2b5ffc7c7ca072074 (patch) | |
tree | a857e894b6917bbfddddc6bc7be7c838a80fa151 | |
parent | 4e8e2288650780f74f90ee0c5133c1effbfdca17 (diff) |
service: don't wait for any child unless we no its pid
-rw-r--r-- | service.c | 2 | ||||
-rw-r--r-- | socket.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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; @@ -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; |