- i_ret = VLC_AddIntf( 0, NULL, VLC_TRUE, VLC_TRUE );
-
- /* Finish the threads */
- VLC_CleanUp( 0 );
-
- Kill ();
-
- /* Destroy the libvlc structure */
- VLC_Destroy( 0 );
-
-#if !defined(WIN32) && !defined(UNDER_CE)
- pthread_cancel (sigth);
-# ifdef __APPLE__
- /* In Mac OS X up to 10.4.8 sigwait (among others) is not a pthread
- * cancellation point, so we throw a dummy quit signal to end
- * sigwait() in the sigth thread */
- pthread_kill (sigth, SIGQUIT);
-# endif
- pthread_join (sigth, NULL);
-#endif
-
- return i_ret;
-}
-
-#if !defined(WIN32) && !defined(UNDER_CE)
-/*****************************************************************************
- * SigHandler: system signal handler
- *****************************************************************************
- * This thread receives all handled signals synchronously.
- * It tries to end the program in a clean way.
- *****************************************************************************/
-static void *SigHandler (void *data)
-{
- const sigset_t *set = (sigset_t *)data;
- time_t abort_time = 0;
- vlc_bool_t b_die = VLC_FALSE;
-
-#ifdef __APPLE__
- /* We really prefer the "force quit" menu item to act immediately */
- b_die = VLC_TRUE;
-#endif
-
- for (;;)