SIGPIPE causes macosx vlc to exit when streaming via ftp
On Mac OS X, SIG_BLOCK of SIGPIPE is not enough to prevent SIGPIPE from being delivered when the ftp connection is unexpectedly terminated.
Something similar was reported in #2762 (closed), but not for ftp and the problem wasn't resolved.
Simply adding this solves the problem:
diff --git a/bin/vlc.c b/bin/vlc.c
index 55f7c5f..63be396 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -119,6 +119,8 @@ int main( int i_argc, const char *ppsz_argv[] )
sigdelset (&set, SIGPIPE);
sigdelset (&set, SIGCHLD);
+ signal(SIGPIPE, SIG_IGN);
+
/* Note that FromLocale() can be used before libvlc is initialized */
const char *argv[i_argc + 3];
int argc = 0;