Mercurial > mplayer.hg
comparison mplayer.c @ 25623:b955a135e3a8
Do not use exit_player in the signal handler, this code just can not
be called from a signal handler.
Instead only make the input system generate quit commands for the first
CTRL+C and otherwise do getch2_disable and exit.
author | reimar |
---|---|
date | Tue, 08 Jan 2008 21:40:44 +0000 |
parents | e410a38a4ca8 |
children | 7703675af42d |
comparison
equal
deleted
inserted
replaced
25622:e410a38a4ca8 | 25623:b955a135e3a8 |
---|---|
762 switch(x){ | 762 switch(x){ |
763 case SIGINT: | 763 case SIGINT: |
764 case SIGQUIT: | 764 case SIGQUIT: |
765 case SIGTERM: | 765 case SIGTERM: |
766 case SIGKILL: | 766 case SIGKILL: |
767 break; // killed from keyboard (^C) or killed [-9] | 767 async_quit_request = 1; |
768 return; // killed from keyboard (^C) or killed [-9] | |
768 case SIGILL: | 769 case SIGILL: |
769 #ifdef RUNTIME_CPUDETECT | 770 #ifdef RUNTIME_CPUDETECT |
770 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL_RTCpuSel); | 771 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL_RTCpuSel); |
771 #else | 772 #else |
772 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL); | 773 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL); |
796 } | 797 } |
797 if (x == SIGTRAP) return; | 798 if (x == SIGTRAP) return; |
798 } | 799 } |
799 #endif | 800 #endif |
800 } | 801 } |
801 exit_player(NULL); | 802 getch2_disable(); |
803 exit(1); | |
802 } | 804 } |
803 | 805 |
804 extern void mp_input_register_options(m_config_t* cfg); | 806 extern void mp_input_register_options(m_config_t* cfg); |
805 | 807 |
806 #include "cfg-mplayer.h" | 808 #include "cfg-mplayer.h" |