Commit 3dff442e authored by Sam Hocevar's avatar Sam Hocevar

* ./src/libvlc.c: removed the simple signal handler because it's not

    really needed, and we were calling pthread_mutex_lock from it.
  * ./src/libvlc.c: released a vlc_list_t that caused vlc --list to hang.
parent 894c4adc
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libvlc.c: main libvlc source * libvlc.c: main libvlc source
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.c,v 1.26 2002/08/15 12:11:15 sam Exp $ * $Id: libvlc.c,v 1.27 2002/08/18 13:49:20 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -104,7 +104,6 @@ static void Version ( void ); ...@@ -104,7 +104,6 @@ static void Version ( void );
#ifndef WIN32 #ifndef WIN32
static void InitSignalHandler ( void ); static void InitSignalHandler ( void );
static void SimpleSignalHandler ( int i_signal );
static void FatalSignalHandler ( int i_signal ); static void FatalSignalHandler ( int i_signal );
#endif #endif
...@@ -1130,6 +1129,8 @@ static void ListModules( vlc_t *p_this ) ...@@ -1130,6 +1129,8 @@ static void ListModules( vlc_t *p_this )
psz_spaces[i] = ' '; psz_spaces[i] = ' ';
} }
vlc_list_release( p_list );
#ifdef WIN32 /* Pause the console because it's destroyed when we exit */ #ifdef WIN32 /* Pause the console because it's destroyed when we exit */
fprintf( stderr, _("\nPress the RETURN key to continue...\n") ); fprintf( stderr, _("\nPress the RETURN key to continue...\n") );
getchar(); getchar();
...@@ -1192,26 +1193,8 @@ static void InitSignalHandler( void ) ...@@ -1192,26 +1193,8 @@ static void InitSignalHandler( void )
signal( SIGQUIT, FatalSignalHandler ); signal( SIGQUIT, FatalSignalHandler );
/* Other signals */ /* Other signals */
signal( SIGALRM, SimpleSignalHandler ); signal( SIGALRM, SIG_IGN );
signal( SIGPIPE, SimpleSignalHandler ); signal( SIGPIPE, SIG_IGN );
}
/*****************************************************************************
* SimpleSignalHandler: system signal handler
*****************************************************************************
* This function is called when a non fatal signal is received by the program.
*****************************************************************************/
static void SimpleSignalHandler( int i_signal )
{
int i_index;
/* Acknowledge the signal received and warn all the p_vlc structures */
vlc_mutex_lock( &global_lock );
for( i_index = 0 ; i_index < i_vlc ; i_index++ )
{
msg_Warn( pp_vlc[ i_index ], "ignoring signal %d", i_signal );
}
vlc_mutex_unlock( &global_lock );
} }
/***************************************************************************** /*****************************************************************************
......
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