X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fexecute.c;h=b4ddf8961f390071f690be5c588e01cb8d247917;hp=6b6c2855b48739c04febe6878c37d6370f3e3b11;hb=5192bd1945f59254b3d260ded15dd9f2b8cc2de7;hpb=21d21ea42eadd742873c2bddfd474e3b34510431 diff --git a/src/execute.c b/src/execute.c index 6b6c2855b..b4ddf8961 100644 --- a/src/execute.c +++ b/src/execute.c @@ -1,4 +1,4 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** This file is part of systemd. @@ -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; } @@ -1054,7 +1055,7 @@ int exec_spawn(ExecCommand *command, } if (cgroup_bondings) - if ((r = cgroup_bonding_install_list(cgroup_bondings, 0)) < 0) { + if (cgroup_bonding_install_list(cgroup_bondings, 0) < 0) { r = EXIT_CGROUP; goto fail; }