signal handlers do not treat core file.

kawasa_r at itg.hitachi.co.jp kawasa_r at itg.hitachi.co.jp
Fri May 7 09:38:51 GMT 2004


Nmbd, smbd, and winbindd do not output core dump files even if they catch 
SIGABRT or SIGSEGV. 

Signal handlers for SIGABRT, SIGSEGV, and SIGBUS are added in the second 
release candidate of 3.0.2.
After that, sig_fault() catches the abort() call from smb_panic().
This signal handler calls fault_report() and logs the event. However, 
fault_report() calls _exit(1) except for its first-time-call, so the 
process is terminated without creating any core file. Perhaps this 
is an unintentional move.

Before calling abort() in the function smb_panic(), the signal handler 
of SIGABRT set to default.

Index: samba-302/source/lib/util.c
===================================================================
RCS file: /cvs/samba-302/source/lib/util.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- samba-302/source/lib/util.c	16 Feb 2004 01:13:35 -0000	1.1
+++ samba-302/source/lib/util.c	1 Mar 2004 05:35:51 -0000	1.2
@@ -1419,6 +1419,10 @@
 #endif
 
 	dbgflush();
+
+#ifdef SIGABRT
+	CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL);
+#endif
 	abort();
 }



More information about the samba-technical mailing list