]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shutdown: don't close pipe fds.
authorLennart Poettering <lennart@poettering.net>
Tue, 10 Jan 2023 11:09:58 +0000 (12:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 10 Jan 2023 13:51:46 +0000 (14:51 +0100)
Man, I royally screwed this one up! ðŸ˜³

Fixes: #25998
src/shutdown/umount.c

index dc662a5812fa83319d3d6987c0c1f4174d2a0422..1326b32f6af4681a9eed272528115d508e910535 100644 (file)
@@ -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) {