X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bin%2Fvlc.c;h=94465e65425bb4f26b25238a94b7113d340f2c4e;hb=4164da8033e507fc6b65f7f54cc0e06f5ccea631;hp=55f7c5f70fe1a9bf403ab3f3d14a6c4a346d8987;hpb=0c88710e2ccac34ffb971a3531584d0cbd3d739a;p=vlc diff --git a/bin/vlc.c b/bin/vlc.c index 55f7c5f70f..94465e6542 100644 --- a/bin/vlc.c +++ b/bin/vlc.c @@ -51,6 +51,12 @@ int main( int i_argc, const char *ppsz_argv[] ) { int i_ret; +#ifdef __APPLE__ + /* The so-called POSIX-compliant MacOS X is not. + * SIGPIPE fires even when it is blocked in all threads! */ + signal (SIGPIPE, SIG_IGN); +#endif + #ifndef ALLOW_RUN_AS_ROOT if (geteuid () == 0) { @@ -152,6 +158,7 @@ int main( int i_argc, const char *ppsz_argv[] ) pthread_sigmask (SIG_UNBLOCK, &set, NULL); } libvlc_add_intf (vlc, "globalhotkeys,none", &ex); + libvlc_exception_clear (&ex); libvlc_add_intf (vlc, NULL, &ex); libvlc_playlist_play (vlc, -1, 0, NULL, &dummy); libvlc_wait (vlc); @@ -159,7 +166,7 @@ int main( int i_argc, const char *ppsz_argv[] ) } i_ret = libvlc_exception_raised (&ex); if( i_ret ) - fprintf( stderr, "%s\n", libvlc_exception_get_message( &ex)); + fprintf( stderr, "%s\n", libvlc_errmsg() ); libvlc_exception_clear (&ex); libvlc_exception_clear (&dummy);