[vlc-commits] Do not print start banner if stderr is not a TTY.
Rémi Denis-Courmont
git at videolan.org
Sat Jul 16 11:55:55 CEST 2011
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jul 16 11:51:18 2011 +0300| [bc3e52940ad26da0cc22b9f34985ffd50a293422] | committer: Rémi Denis-Courmont
Do not print start banner if stderr is not a TTY.
The user is not going to see the banner, and this tends to clutter
error logs (X server, cron jobs...) - not only on MacOS.
(cherry picked from commit 62f348b047c0c691c4a47970072522a66633f486)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=bc3e52940ad26da0cc22b9f34985ffd50a293422
---
bin/vlc.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/bin/vlc.c b/bin/vlc.c
index 51633b2..200060f 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -99,11 +99,11 @@ int main( int i_argc, const char *ppsz_argv[] )
setlocale (LC_ALL, "");
-#ifndef __APPLE__
- /* This clutters OSX GUI error logs */
- fprintf( stderr, "VLC media player %s (revision %s)\n",
- libvlc_get_version(), libvlc_get_changeset() );
-#endif
+ if (isatty (STDERR_FILENO))
+ /* This message clutters error logs. It is print it only on a TTY.
+ * Forunately, LibVLC prints version infos with -vv anyhow. */
+ fprintf (stderr, "VLC media player %s (revision %s)\n",
+ libvlc_get_version(), libvlc_get_changeset());
/* Synchronously intercepted POSIX signals.
*
More information about the vlc-commits
mailing list