Skip to content

Commit 0729f3a

Browse files
committed
libinitramfs/logging: Make stderr unbuffered
Signed-off-by: Alexey Gladkov <[email protected]>
1 parent d38c24a commit 0729f3a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

runtime/src/libinitramfs/logging.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,6 @@ void rd_log_setup_stderr(const char *logfile)
145145

146146
if (!freopen(logfile, "w+", stderr))
147147
rd_fatal("freopen(%s): %m", logfile);
148+
149+
setvbuf(stderr, NULL, _IONBF, 0);
148150
}

0 commit comments

Comments
 (0)