mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 10:02:17 +00:00
mp_msg: print MSGL_STATUS to stderr if stderr is redirected
Of course, status output is still hidden when stderr is a tty which is not the foreground tty.
This commit is contained in:
parent
b1ae33a355
commit
3091394edc
@ -111,8 +111,8 @@ int mp_msg_test(int mod, int lev)
|
||||
{
|
||||
#ifndef __MINGW32__
|
||||
if (lev == MSGL_STATUS) {
|
||||
// skip status line output if stderr is not in the fg process group
|
||||
if (tcgetpgrp(2) != getpgrp())
|
||||
// skip status line output if stderr is a tty but in background
|
||||
if (isatty(2) && tcgetpgrp(2) != getpgrp())
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user