vlc.c: Make sure exiting after two Ctrl-C is instantaneous on Mac OS X.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 23 Feb 2008 21:22:10 +0000 (21:22 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 23 Feb 2008 21:22:10 +0000 (21:22 +0000)
src/vlc.c

index b7a340a..e934b88 100644 (file)
--- a/src/vlc.c
+++ b/src/vlc.c
@@ -291,7 +291,16 @@ static void *SigHandler (void *data)
             /* If user asks again more than 2 seconds later, die badly */
             pthread_sigmask (SIG_UNBLOCK, exitset, NULL);
             fprintf (stderr, "user insisted too much, dying badly\n");
+#ifdef __APPLE__
+            /* On Mac OS X, use exit(-1) as it doesn't trigger
+             * backtrace generation, whereas abort() does.
+             * The backtrace generation trigger a Crash Dialog
+             * And takes way too much time, which is not what
+             * we want. */
+            exit (-1);
+#else
             abort ();
+#endif
         }
         pthread_setcancelstate (state, NULL);
     }