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:
Rudolf Polzer 2013-03-18 20:42:01 +01:00
parent b1ae33a355
commit 3091394edc
1 changed files with 2 additions and 2 deletions

View File

@ -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