diff options
Diffstat (limited to 'src/libsystemd-bus/bus-container.c')
-rw-r--r-- | src/libsystemd-bus/bus-container.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libsystemd-bus/bus-container.c b/src/libsystemd-bus/bus-container.c index 1989afa82a..d330363b6f 100644 --- a/src/libsystemd-bus/bus-container.c +++ b/src/libsystemd-bus/bus-container.c @@ -205,6 +205,16 @@ int bus_container_connect_kernel(sd_bus *b) { close_nointr_nofail(pair[1]); pair[1] = -1; + r = wait_for_terminate(child, &si); + if (r < 0) + return r; + + if (si.si_code != CLD_EXITED) + return -EIO; + + if (si.si_status != EXIT_SUCCESS) + return -EIO; + if (recvmsg(pair[0], &mh, MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) < 0) return -errno; @@ -224,16 +234,6 @@ int bus_container_connect_kernel(sd_bus *b) { fd = fds[0]; } - r = wait_for_terminate(child, &si); - if (r < 0) - return r; - - if (si.si_code != CLD_EXITED) - return -EIO; - - if (si.si_status != EXIT_SUCCESS) - return -EIO; - b->input_fd = b->output_fd = fd; fd = -1; |