Index: src/main.c =================================================================== --- src/main.c (revision 3694) +++ src/main.c (revision 3695) @@ -79,12 +79,6 @@ #ifdef PCB_HAVE_SIGQUIT signal(SIGQUIT, CatchSignal); #endif -#ifdef PCB_HAVE_SIGABRT - signal(SIGABRT, CatchSignal); -#endif -#ifdef PCB_HAVE_SIGSEGV - signal(SIGSEGV, CatchSignal); -#endif #ifdef PCB_HAVE_SIGTERM signal(SIGTERM, CatchSignal); #endif @@ -92,6 +86,16 @@ signal(SIGINT, CatchSignal); #endif +#ifdef NDEBUG +/* so that we get a core dump on segfault in debug mode */ +# ifdef PCB_HAVE_SIGABRT + signal(SIGABRT, CatchSignal); +# endif +# ifdef PCB_HAVE_SIGSEGV + signal(SIGSEGV, CatchSignal); +# endif +#endif + /* calling external program by popen() may cause a PIPE signal, * so we ignore it */