summaryrefslogtreecommitdiffstats
path: root/src/shared/mkfs-util.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-08-25 14:25:33 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-08-25 14:25:33 +0200
commitfbc6a7557120fbb97d781a5d2c640a3c55c3000f (patch)
treedfb0fc48ca5976381933d120355248a3d6631306 /src/shared/mkfs-util.c
parentMerge pull request #28946 from poettering/json-variant-append-arrayb (diff)
downloadsystemd-fbc6a7557120fbb97d781a5d2c640a3c55c3000f.tar.xz
systemd-fbc6a7557120fbb97d781a5d2c640a3c55c3000f.zip
mkfs-util: Set FORK_REOPEN_LOG
We set FORK_CLOSE_ALL_FDS, so we should also set FORK_REOPEN_LOG to reopen the log in the child process so we don't miss any logging messages.
Diffstat (limited to '')
-rw-r--r--src/shared/mkfs-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/mkfs-util.c b/src/shared/mkfs-util.c
index b936a4733f..6fb0e2a165 100644
--- a/src/shared/mkfs-util.c
+++ b/src/shared/mkfs-util.c
@@ -603,7 +603,7 @@ int make_filesystem(
/*except_fds=*/ NULL,
/*n_except_fds=*/ 0,
FORK_RESET_SIGNALS|FORK_RLIMIT_NOFILE_SAFE|FORK_DEATHSIG|FORK_LOG|FORK_WAIT|
- FORK_CLOSE_ALL_FDS|FORK_REARRANGE_STDIO|FORK_NEW_MOUNTNS,
+ FORK_CLOSE_ALL_FDS|FORK_REARRANGE_STDIO|FORK_NEW_MOUNTNS|FORK_REOPEN_LOG,
/*ret_pid=*/ NULL);
if (r < 0)
return r;