mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-18 18:46:51 +00:00
policycoreutils/setfiles: don't scramble stdout and stderr together
https://bugzilla.redhat.com/show_bug.cgi?id=1435894 When output to a non-tty (as caused by the implementation of fixfiles), stdout is fully buffered. stdout should be flushed before writes to stderr. See e.g. https://news.ycombinator.com/item?id=1271015 Signed-off-by: Alan Jenkins <alan.christopher.jenkins@gmail.com>
This commit is contained in:
parent
1da6fb0610
commit
1ac883f1bf
@ -149,6 +149,7 @@ log_callback(int type, const char *fmt, ...)
|
|||||||
out = stdout;
|
out = stdout;
|
||||||
} else {
|
} else {
|
||||||
out = stderr;
|
out = stderr;
|
||||||
|
fflush(stdout);
|
||||||
fprintf(out, "%s: ", r_opts.progname);
|
fprintf(out, "%s: ", r_opts.progname);
|
||||||
}
|
}
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
Loading…
Reference in New Issue
Block a user