# endif
#endif
+#if HAVE_BACKTRACE
+#include <execinfo.h>
+#endif
+
#include <ctype.h>
#include <string.h>
#include <dirent.h>
#include "control.h"
#include "tools.h"
#include "euidindex.h"
-#include "serv_network.h" /* Needed for destroy_network_queue_room called from master_cleanup */
+/*#include "serv_network.h"*/ /* Needed for destroy_network_queue_room called from master_cleanup */
#ifndef HAVE_SNPRINTF
#include "snprintf.h"
int do_defrag = 0;
time_t server_startup_time;
+/**
+ * \brief print the actual stack frame.
+ */
+void cit_backtrace(void)
+{
+#ifdef HAVE_BACKTRACE
+ void *stack_frames[50];
+ size_t size, i;
+ char **strings;
+
+
+ size = backtrace(stack_frames, sizeof(stack_frames) / sizeof(void*));
+ strings = backtrace_symbols(stack_frames, size);
+ for (i = 0; i < size; i++) {
+ if (strings != NULL)
+ lprintf(1, "%s\n", strings[i]);
+ else
+ lprintf(1, "%p\n", stack_frames[i]);
+ }
+ free(strings);
+#endif
+}
/*
* Various things that need to be initialized at startup
*/
close_databases();
/* flush the networker stuff */
- destroy_network_queue_room();
+/* destroy_network_queue_room();*/
/* Do system-dependent stuff */
sysdep_master_cleanup();