[vlc-commits] 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)

Felix Paul Kühne git at videolan.org
Tue Feb 14 18:40:53 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Feb 14 18:39:17 2012 +0100| [55c6f68897a18e906edebc596c84c2ad43f78f3f] | committer: Felix Paul Kühne

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)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55c6f68897a18e906edebc596c84c2ad43f78f3f
---

 modules/gui/macosx/intf.m |   13 -------------
 src/interface/interface.c |    3 +++
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 88148db..b0eba89 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -192,16 +192,6 @@ static int f_appExit = 0;           // set to 1 when application termination sig
 
 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];
     [VLCApplication sharedApplication];
 
@@ -713,9 +703,6 @@ static VLCMain *_o_sharedMainInstance = nil;
     config_PutInt( p_intf, "loop", var_GetBool( p_playlist, "loop" ) );
     config_PutInt( p_intf, "repeat", var_GetBool( p_playlist, "repeat" ) );
 
-    // save stuff
-    config_SaveConfigFile( p_intf );
-
     msg_Dbg( p_intf, "Terminating" );
 
     /* unsubscribe from the interactive dialogues */
diff --git a/src/interface/interface.c b/src/interface/interface.c
index 0d75fef..11068ce 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -202,6 +202,9 @@ void intf_DestroyAll( libvlc_int_t *p_libvlc )
         if( p_intf->pf_run )
         {
             vlc_cancel( p_intf->thread );
+#ifdef __APPLE__
+            if (!p_intf->b_should_run_on_first_thread)
+#endif
             vlc_join( p_intf->thread, NULL );
         }
         module_unneed( p_intf, p_intf->p_module );



More information about the vlc-commits mailing list