Commit 785ebcc0 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: since Cocoa expects the main thread to quit (and needs to run on the...

macosx: since Cocoa expects the main thread to quit (and needs to run on the main thread in the first place), we cannot join the macosx intf's thread (fixes #6026)
(cherry picked from commit 55c6f688)
parent 348b457c
...@@ -192,16 +192,6 @@ static int f_appExit = 0; // set to 1 when application termination sig ...@@ -192,16 +192,6 @@ static int f_appExit = 0; // set to 1 when application termination sig
static void Run( intf_thread_t *p_intf ) static void Run( intf_thread_t *p_intf )
{ {
sigset_t set;
/* Make sure the "force quit" menu item does quit instantly.
* VLC overrides SIGTERM which is sent by the "force quit"
* menu item to make sure daemon mode quits gracefully, so
* we un-override SIGTERM here. */
sigemptyset( &set );
sigaddset( &set, SIGTERM );
pthread_sigmask( SIG_UNBLOCK, &set, NULL );
NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
[VLCApplication sharedApplication]; [VLCApplication sharedApplication];
...@@ -713,9 +703,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -713,9 +703,6 @@ static VLCMain *_o_sharedMainInstance = nil;
config_PutInt( p_intf, "loop", var_GetBool( p_playlist, "loop" ) ); config_PutInt( p_intf, "loop", var_GetBool( p_playlist, "loop" ) );
config_PutInt( p_intf, "repeat", var_GetBool( p_playlist, "repeat" ) ); config_PutInt( p_intf, "repeat", var_GetBool( p_playlist, "repeat" ) );
// save stuff
config_SaveConfigFile( p_intf );
msg_Dbg( p_intf, "Terminating" ); msg_Dbg( p_intf, "Terminating" );
/* unsubscribe from the interactive dialogues */ /* unsubscribe from the interactive dialogues */
......
...@@ -201,6 +201,9 @@ void intf_DestroyAll( libvlc_int_t *p_libvlc ) ...@@ -201,6 +201,9 @@ void intf_DestroyAll( libvlc_int_t *p_libvlc )
if( p_intf->pf_run ) if( p_intf->pf_run )
{ {
vlc_cancel( p_intf->thread ); vlc_cancel( p_intf->thread );
#ifdef __APPLE__
if (!p_intf->b_should_run_on_first_thread)
#endif
vlc_join( p_intf->thread, NULL ); vlc_join( p_intf->thread, NULL );
} }
module_unneed( p_intf, p_intf->p_module ); module_unneed( p_intf, p_intf->p_module );
......
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