From: Lennart Poettering Date: Wed, 14 Jul 2010 02:47:57 +0000 (+0200) Subject: socket: don't close sockets when activating per-connection units X-Git-Tag: v4~56 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=73883adc1eb4c749b0cf6fed210040e57dd7147e socket: don't close sockets when activating per-connection units --- diff --git a/src/execute.c b/src/execute.c index 6b6c2855b..352def3cf 100644 --- a/src/execute.c +++ b/src/execute.c @@ -976,7 +976,8 @@ int exec_spawn(ExecCommand *command, /* Close sockets very early to make sure we don't * block init reexecution because it cannot bind its * sockets */ - if (close_all_fds(fds, n_fds) < 0) { + if (close_all_fds(socket_fd >= 0 ? &socket_fd : fds, + socket_fd >= 0 ? 1 : n_fds) < 0) { r = EXIT_FDS; goto fail; }