static void smb_panic_default(const char *why) _NORETURN_;
static void smb_panic_default(const char *why)
{
- DBG_ERR("PANIC (pid %llu): %s\n",
- (unsigned long long)getpid(), why);
- log_stack_trace();
-
#if defined(HAVE_PRCTL) && defined(PR_SET_PTRACER)
/*
* Make sure all children can attach a debugger.
abort();
}
-
-/**
- Something really nasty happened - panic !
-**/
-_PUBLIC_ void smb_panic(const char *why)
+_PUBLIC_ void smb_panic_log(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 "
+ DEBUG(0,("INTERNAL ERROR: %s in pid %lld (%s)\n",
+ why,
+ (unsigned long long)getpid(),
+ SAMBA_VERSION_STRING));
+ DEBUG(0,("If 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);
+ DEBUG(0,("PANIC (pid %llu): %s in " SAMBA_VERSION_STRING "\n",
+ (unsigned long long)getpid(), why));
+
+ log_stack_trace();
+}
+
+/**
+ Something really nasty happened - panic !
+**/
+_PUBLIC_ void smb_panic(const char *why)
+{
+ smb_panic_log(why);
if (fault_state.panic_handler) {
fault_state.panic_handler(why);