diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index c15189b4ea..0771e291c2 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -1679,13 +1679,13 @@ static int gather_pid_mount_tree_fd(const Context *context) { "(sd-mount-tree)", /* except_fds= */ NULL, /* n_except_fds= */ 0, - FORK_RESET_SIGNALS|FORK_DEATHSIG_SIGKILL|FORK_LOG, + FORK_RESET_SIGNALS|FORK_DEATHSIG_SIGKILL|FORK_LOG|FORK_WAIT, /* pidns_fd= */ -EBADF, mntns_fd, /* netns_fd= */ -EBADF, /* userns_fd= */ -EBADF, root_fd, - &child); + NULL); if (r < 0) return r; if (r == 0) { @@ -1708,12 +1708,6 @@ static int gather_pid_mount_tree_fd(const Context *context) { pair[1] = safe_close(pair[1]); - r = wait_for_terminate_and_check("(sd-mount-tree-ns)", child, 0); - if (r < 0) - return log_error_errno(r, "Failed to wait for child: %m"); - if (r != EXIT_SUCCESS) - return log_error_errno(SYNTHETIC_ERRNO(ECHILD), "Child died abnormally."); - fd = receive_one_fd(pair[0], MSG_DONTWAIT); if (fd < 0) return log_error_errno(fd, "Failed to receive mount tree: %m");