From 61053dc0050ca2eacc979b1c2468de80157db0e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 11 Apr 2010 12:07:46 +0300 Subject: [PATCH] Always use the SIGPIPE hack even if not needed, it cannot hurt --- bin/vlc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/vlc.c b/bin/vlc.c index 9ccbdd8940..5d6fec3502 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) -- 2.39.2