[vlc-commits] commit: Always use the SIGPIPE hack even if not needed, it cannot hurt ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sun Apr 11 11:11:06 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 11 12:07:46 2010 +0300| [61053dc0050ca2eacc979b1c2468de80157db0e2] | committer: Rémi Denis-Courmont 

Always use the SIGPIPE hack even if not needed, it cannot hurt

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=61053dc0050ca2eacc979b1c2468de80157db0e2
---

 bin/vlc.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/bin/vlc.c b/bin/vlc.c
index 9ccbdd8..5d6fec3 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -54,11 +54,12 @@ extern char *FromLocale (const char *);
  *****************************************************************************/
 int main( int i_argc, const char *ppsz_argv[] )
 {
-#ifdef __APPLE__
-    /* The so-called POSIX-compliant MacOS X is not. 
-     * SIGPIPE fires even when it is blocked in all threads! */
+    /* The so-called POSIX-compliant MacOS X reportedly processes SIGPIPE even
+     * if it is blocked in all thread. Also some libraries want SIGPIPE blocked
+     * as they have no clue about signal masks.
+     * Note: this is NOT an excuse for not protecting against SIGPIPE. If
+     * LibVLC runs outside of VLC, we cannot rely on this code snippet. */
     signal (SIGPIPE, SIG_IGN);
-#endif
 
 #ifndef ALLOW_RUN_AS_ROOT
     if (geteuid () == 0)



More information about the vlc-commits mailing list