Commit 61053dc0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

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

parent ea7d9bab
...@@ -54,11 +54,12 @@ extern char *FromLocale (const char *); ...@@ -54,11 +54,12 @@ extern char *FromLocale (const char *);
*****************************************************************************/ *****************************************************************************/
int main( int i_argc, const char *ppsz_argv[] ) int main( int i_argc, const char *ppsz_argv[] )
{ {
#ifdef __APPLE__ /* The so-called POSIX-compliant MacOS X reportedly processes SIGPIPE even
/* The so-called POSIX-compliant MacOS X is not. * if it is blocked in all thread. Also some libraries want SIGPIPE blocked
* SIGPIPE fires even when it is blocked in all threads! */ * 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); signal (SIGPIPE, SIG_IGN);
#endif
#ifndef ALLOW_RUN_AS_ROOT #ifndef ALLOW_RUN_AS_ROOT
if (geteuid () == 0) if (geteuid () == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment