# HG changeset patch # User atmos4 # Date 1017200755 0 # Node ID 658ea5d7316a52a93deb91d43ab16f300061347e # Parent f46873b05f82cfd1273e79da1d20369e399557f7 Allow to disable crasj sighandler to enable creation of coredump files. diff -r f46873b05f82 -r 658ea5d7316a configure --- a/configure Wed Mar 27 03:07:07 2002 +0000 +++ b/configure Wed Mar 27 03:45:55 2002 +0000 @@ -194,6 +194,7 @@ --disable-fastmemcpy disable 3dnow/sse/mmx optimized memcpy() [enable] --enable-debug[=1-3] compile debugging information into mplayer [disable] --enable-profile compile profiling information into mplayer [disable] + --disable-sighandler disable sighandler for crashes [enable] Hazardous options a.k.a. "DO NOT BUGREPORT ANYTHING !" --disable-gcc-checking disable gcc version checking [enable] @@ -824,6 +825,7 @@ _shm=auto _linux_devfs=no _i18n=no +_sighandler=yes for ac_option do case "$ac_option" in @@ -998,6 +1000,9 @@ --enable-debug=*) _debug=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2` ;; + --disable-sighandler) + _sighandler=no + ;; --enable-sse) _sse=yes ;; --disable-sse) _sse=no ;; @@ -1221,6 +1226,13 @@ _mp_help="help_mp-${LINGUAS}.h" test -f help_mp-${LINGUAS}.h || die "help_mp-${LINGUAS}.h not found" +echocheck "enable sighandler" +if test "$_sighandler" = yes ; then + _def_sighandler='#define ENABLE_SIGHANDLER 1' +else + _def_sighandler='#undef ENABLE_SIGHANDLER' +fi +echores "$_sighandler" echocheck "runtime cpudetection" if test "$_runtime_cpudetection" = yes ; then @@ -3344,6 +3356,9 @@ #define USE_OSD 1 #define USE_SUB 1 +/* enable/disable SIGHANDLER */ +$_def_sighandler + /* Toggles debugging informations */ $_def_debug diff -r f46873b05f82 -r 658ea5d7316a mplayer.c --- a/mplayer.c Wed Mar 27 03:07:07 2002 +0000 +++ b/mplayer.c Wed Mar 27 03:45:55 2002 +0000 @@ -726,12 +726,14 @@ signal(SIGINT,exit_sighandler); // Interrupt from keyboard signal(SIGQUIT,exit_sighandler); // Quit from keyboard +#ifdef ENABLE_SIGHANDLER // fatal errors: signal(SIGBUS,exit_sighandler); // bus error signal(SIGSEGV,exit_sighandler); // segfault signal(SIGILL,exit_sighandler); // illegal instruction signal(SIGFPE,exit_sighandler); // floating point exc. signal(SIGABRT,exit_sighandler); // abort() +#endif // ******************* Now, let's see the per-file stuff ********************