r645: Patch from kawasa_r@itg.hitachi.co.jp to correctly enable core dumps.
authorJeremy Allison <jra@samba.org>
Tue, 11 May 2004 01:05:59 +0000 (01:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:51:32 +0000 (10:51 -0500)
Jeremy.

source/lib/util.c
source/smbd/server.c

index 527e1376d1c99433cdcbecbd36f1ae7858b4b43a..e8ffd9d8d2e77337e28c054e5fc12709c0d3f0db 100644 (file)
@@ -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();
 }
 
index 53d07fd905cc1669387cc694dab24188368c7956..f25d42711db38a25f18d9a8e00d43f81cc62021e 100644 (file)
@@ -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);
 }