return;
}
- fprintf(fp, "B_DB %p db_name=%s db_user=%s connected=%i\n",
+ fprintf(fp, "B_DB=%p db_name=%s db_user=%s connected=%i\n",
mdb, NPRTB(mdb->db_name), NPRTB(mdb->db_user), mdb->connected);
fprintf(fp, "\tcmd=\"%s\" changes=%i\n", NPRTB(mdb->cmd), mdb->changes);
if (mdb->lock.valid == RWLOCK_VALID) {
- fprintf(fp, "\tRWLOCK %p w_active=%i w_wait=%i\n", &mdb->lock, mdb->lock.w_active, mdb->lock.w_wait);
+ fprintf(fp, "\tRWLOCK=%p w_active=%i w_wait=%i\n", &mdb->lock, mdb->lock.w_active, mdb->lock.w_wait);
#ifndef HAVE_WIN32
fprintf(fp, "\t\tthreadid=0x%x mutex=%p\n", (int)mdb->lock.writer_id, &mdb->lock.mutex);
#endif
{
char buf[512];
- snprintf(buf, sizeof(buf), "%s/bacula.%d.bactrace",
- working_directory, getpid());
+ snprintf(buf, sizeof(buf), "%s/%s.%d.bactrace",
+ working_directory, my_name, getpid());
FILE *fp = fopen(buf, "ab") ;
if (!fp) {
fp = stderr;
}
+
+ fprintf(stderr, "Dumping: %s\n", buf);
/* Print also B_DB and RWLOCK structure
* Can add more info about JCR with dbg_jcr_add_hook()
bmicrosleep(30, 0);
}
fprintf(stderr, _("It looks like the traceback worked ...\n"));
+ dbg_print_bacula();
}
#endif
-
exit_handler(sig);
}