]> git.sesse.net Git - vlc/commitdiff
* ./src/vlc.c: reduced the amount of default simultaneous interfaces.
authorSam Hocevar <sam@videolan.org>
Thu, 11 Jul 2002 18:44:12 +0000 (18:44 +0000)
committerSam Hocevar <sam@videolan.org>
Thu, 11 Jul 2002 18:44:12 +0000 (18:44 +0000)
  * ./src/libvlc.c: removed calls to vlc_mutex_lock in sighandlers.

src/libvlc.c
src/vlc.c

index e49ccb68ad95dab8e59a1570b37e98044880893a..923d1b83c499239053581e41b3973596a958e82a 100644 (file)
@@ -4,7 +4,7 @@
  * and spawns threads.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: libvlc.c,v 1.12 2002/07/03 19:40:49 sam Exp $
+ * $Id: libvlc.c,v 1.13 2002/07/11 18:44:12 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -1182,19 +1182,19 @@ static void FatalSignalHandler( int i_signal )
      * armed and following signals will be ignored to avoid sending messages
      * to an interface having been destroyed */
 
-    vlc_mutex_lock( &global_lock );
     if( !b_die )
     {
         b_die = VLC_TRUE;
         abort_time = mdate();
 
+        fprintf( stderr, "signal %d received, terminating libvlc - do it "
+                         "again in case your process gets stuck\n", i_signal );
+
         /* Try to terminate everything - this is done by requesting the end of
          * all the p_vlc structures */
         for( i_index = 0 ; i_index < i_vlc ; i_index++ )
         {
             /* Acknowledge the signal received */
-            msg_Err( pp_vlc[ i_index ], "signal %d received, exiting - do it "
-                     "again in case vlc gets stuck", i_signal );
             pp_vlc[ i_index ]->b_die = VLC_TRUE;
         }
     }
@@ -1205,16 +1205,10 @@ static void FatalSignalHandler( int i_signal )
         signal( SIGHUP,  SIG_IGN );
         signal( SIGQUIT, SIG_IGN );
 
-        for( i_index = 0 ; i_index < i_vlc ; i_index++ )
-        {
-            msg_Err( pp_vlc[ i_index ], "user insisted too much, dying badly" );
-        }
+        fprintf( stderr, "user insisted too much, dying badly\n" );
 
-        vlc_mutex_unlock( &global_lock );
         exit( 1 );
     }
-
-    vlc_mutex_unlock( &global_lock );
 }
 #endif
 
index 068f226e9f834d411b3666baffc086abb6e9d3ac..6ab32ab2c897184983561e622f17d07a68d081cf 100644 (file)
--- a/src/vlc.c
+++ b/src/vlc.c
@@ -2,7 +2,7 @@
  * vlc.c: the vlc player
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: vlc.c,v 1.3 2002/07/03 19:40:49 sam Exp $
+ * $Id: vlc.c,v 1.4 2002/07/11 18:44:12 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -68,9 +68,10 @@ int main(int i_argc, char *ppsz_argv[], char *ppsz_env[])
 
     /* Add background interfaces */
     //{ int i; for( i=10; i--; ) vlc_add_intf( p_vlc, "dummy", 0 ); }
-    vlc_add_intf( p_vlc, "dummy", VLC_FALSE );
-    vlc_add_intf( p_vlc, "logger", VLC_FALSE );
+    //vlc_add_intf( p_vlc, "dummy", VLC_FALSE );
+    //vlc_add_intf( p_vlc, "logger", VLC_FALSE );
     //vlc_add_intf( p_vlc, "xosd", VLC_FALSE );
+    //vlc_add_intf( p_vlc, "gtk", VLC_FALSE );
     //vlc_add_intf( p_vlc, "kde", VLC_FALSE );
     vlc_add_intf( p_vlc, "rc", VLC_FALSE );