From: Lennart Poettering Date: Tue, 10 Jan 2023 11:09:58 +0000 (+0100) Subject: shutdown: don't close pipe fds. X-Git-Tag: v253-rc1~141 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9914ae60382176b6a09c6226e8e90ab7184e8431;p=thirdparty%2Fsystemd.git shutdown: don't close pipe fds. Man, I royally screwed this one up! 😳 Fixes: #25998 --- diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c index dc662a5812f..1326b32f6af 100644 --- a/src/shutdown/umount.c +++ b/src/shutdown/umount.c @@ -608,7 +608,7 @@ static int remount_with_timeout(MountPoint *m, bool last_try) { /* Due to the possibility of a remount operation hanging, we fork a child process and set a * timeout. If the timeout lapses, the assumption is that the particular remount failed. */ - r = safe_fork("(sd-remount)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_REOPEN_LOG, &pid); + r = safe_fork_full("(sd-remount)", pfd, ELEMENTSOF(pfd), FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_REOPEN_LOG, &pid); if (r < 0) return r; if (r == 0) { @@ -661,7 +661,7 @@ static int umount_with_timeout(MountPoint *m, bool last_try) { /* Due to the possibility of a umount operation hanging, we fork a child process and set a * timeout. If the timeout lapses, the assumption is that the particular umount failed. */ - r = safe_fork("(sd-umount)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_REOPEN_LOG, &pid); + r = safe_fork_full("(sd-umount)", pfd, ELEMENTSOF(pfd), FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_REOPEN_LOG, &pid); if (r < 0) return r; if (r == 0) {