From 372dac6c982ac52926c268df71bf6fb4ca2d155b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 11 May 2004 01:05:59 +0000 Subject: r645: Patch from kawasa_r@itg.hitachi.co.jp to correctly enable core dumps. Jeremy. (This used to be commit ea41d694270264557f740cd40ccc69b4acaa57e9) --- source3/lib/util.c | 3 +++ source3/smbd/server.c | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'source3') diff --git a/source3/lib/util.c b/source3/lib/util.c index 527e1376d1..e8ffd9d8d2 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1440,6 +1440,9 @@ void smb_panic2(const char *why, BOOL decrement_pid_count ) #endif dbgflush(); +#ifdef SIGABRT + CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL); +#endif abort(); } diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 53d07fd905..f25d42711d 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -545,6 +545,10 @@ static BOOL dump_core(void) DEBUG(0,("Dumping core in %s\n", dname)); + /* Ensure we don't have a signal handler for abort. */ +#ifdef SIGABRT + CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL); +#endif abort(); return(True); } -- cgit