chiark / gitweb /
Remove .h files from _SOURCES
[elogind.git] / socket.c
index 6d15cfe0e9e3f345f74009803559f803b56fbc5e..402eeaf628b04fa3336f1fe0c98417789a941c3e 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -578,6 +578,7 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
                        argv,
                        &s->exec_context,
                        NULL, 0,
+                       s->meta.manager->environment,
                        true,
                        true,
                        UNIT(s)->meta.manager->confirm_spawn,
@@ -667,7 +668,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;