+ /* If we want it printed, do so */
+#ifdef direct_print
+ if (prt_kaboom) {
+ FILE *fd;
+ snprintf(buf, sizeof(buf), "%s/bacula.%s.traceback", working_directory, pid_buf);
+ fd = fopen(buf, "r");
+ if (fd != NULL) {
+ printf("\n\n ==== Traceback output ====\n\n");
+ while (fgets(buf, (int)sizeof(buf), fd) != NULL) {
+ printf("%s", buf);
+ }
+ fclose(fd);
+ printf(" ==== End traceback output ====\n\n");
+ }
+ }
+#else
+ if (prt_kaboom) {
+ snprintf(buf, sizeof(buf), "/bin/cat %s/bacula.%s.traceback", working_directory, pid_buf);
+ fprintf(stderr, "\n\n ==== Traceback output ====\n\n");
+ system(buf);
+ fprintf(stderr, " ==== End traceback output ====\n\n");
+ }
+#endif
+ /* print information about the current state into working/<file>.bactrace */
+ dbg_print_bacula();