summaryrefslogtreecommitdiffstats
path: root/core/mp_msg.c
diff options
context:
space:
mode:
authorRudolf Polzer <divverent@xonotic.org>2013-03-18 20:42:01 +0100
committerRudolf Polzer <divverent@xonotic.org>2013-03-18 20:42:01 +0100
commit3091394edca48b8876326cb1d67813450c20a332 (patch)
tree6ffb075e0062330cf8368348ad9f12fa35d05b14 /core/mp_msg.c
parentb1ae33a3554f919dadc37f40a73e0a0f5b3d8203 (diff)
downloadmpv-3091394edca48b8876326cb1d67813450c20a332.tar.bz2
mpv-3091394edca48b8876326cb1d67813450c20a332.tar.xz
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.
Diffstat (limited to 'core/mp_msg.c')
-rw-r--r--core/mp_msg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/mp_msg.c b/core/mp_msg.c
index 58862406fe..e06d53c0d9 100644
--- a/core/mp_msg.c
+++ b/core/mp_msg.c
@@ -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