do_shutdown++;
} /* }}} void sig_term_handler */
-static int cache_tree_compare (const void *v0, const void *v1) /* {{{ */
-{
- cache_item_t *c0 = (cache_item_t *) v0;
- cache_item_t *c1 = (cache_item_t *) v1;
-
- assert (c0->file != NULL);
- assert (c1->file != NULL);
-
- return (strcmp (c0->file, c1->file));
-} /* }}} int cache_tree_compare */
-
-static void cache_tree_free (void *v) /* {{{ */
-{
- cache_item_t *c = (cache_item_t *) v;
-
- assert (c->values_num == 0);
- assert ((c->flags & CI_FLAGS_IN_TREE) != 0);
- assert ((c->flags & CI_FLAGS_IN_QUEUE) == 0);
-
- free (c->file);
- c->file = NULL;
- free (c);
-} /* }}} void cache_tree_free */
-
static void *queue_thread_main (void *args) /* {{{ */
{
pthread_mutex_lock (&cache_lock);
static void *listen_thread_main (void *args) /* {{{ */
{
- char buffer[4096];
struct pollfd *pollfds;
int pollfds_num;
int status;
static int daemonize (void) /* {{{ */
{
+#if !RRDD_DEBUG
pid_t child;
+#endif
int status;
#if !RRDD_DEBUG