static void fault_report(int sig)
{
static int counter;
+ char signal_string[128];
if (counter) _exit(1);
counter++;
- DEBUGSEP(0);
- DEBUG(0,("INTERNAL ERROR: Signal %d in pid %d (%s)",sig,(int)getpid(),SAMBA_VERSION_STRING));
- DEBUG(0,("\nIf you are running a recent Samba version, and "
- "if you think this problem is not yet fixed in the "
- "latest versions, please consider reporting this "
- "bug, see "
- "https://wiki.samba.org/index.php/Bug_Reporting\n"));
- DEBUGSEP(0);
-
- smb_panic("internal error");
+ snprintf(signal_string, sizeof(signal_string),
+ "Signal %d: %s", sig, strsignal(sig));
+ smb_panic(signal_string);
/* smb_panic() never returns, so this is really redundant */
exit(1);
**/
_PUBLIC_ void smb_panic(const char *why)
{
+ DEBUGSEP(0);
+ DEBUG(0,("INTERNAL ERROR: %s in pid %d (%s)",why,(int)getpid(),SAMBA_VERSION_STRING));
+ DEBUG(0,("\nIf you are running a recent Samba version, and "
+ "if you think this problem is not yet fixed in the "
+ "latest versions, please consider reporting this "
+ "bug, see "
+ "https://wiki.samba.org/index.php/Bug_Reporting\n"));
+ DEBUGSEP(0);
+
if (fault_state.panic_handler) {
fault_state.panic_handler(why);
_exit(1);