]> err.no Git - systemd/commitdiff
service: don't wait for any child unless we no its pid
authorLennart Poettering <lennart@poettering.net>
Sat, 24 Apr 2010 00:05:42 +0000 (02:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 24 Apr 2010 00:05:42 +0000 (02:05 +0200)
service.c
socket.c

index 40a02c16e9a99d7211131db103a3667134514ded..83a11e94f9356cf88813fb027bfbbfd89f1abb3c 100644 (file)
--- 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;
index 6d15cfe0e9e3f345f74009803559f803b56fbc5e..755bc598da7e035b3a278525b543e717ff4caec4 100644 (file)
--- 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;