+#if EMAIL_HAVE_READ
+static void email_shutdown (void)
+{
+ collector_t *ptr;
+
+ if (disabled)
+ return;
+
+ close (connector_socket);
+ pthread_kill (connector, SIGTERM);
+
+ pthread_mutex_lock (&active_mutex);
+
+ for (ptr = active.head; NULL != ptr; ptr = ptr->next) {
+ close (ptr->socket);
+ pthread_kill (ptr->thread, SIGTERM);
+ }
+
+ pthread_mutex_unlock (&active_mutex);
+
+ unlink (SOCK_PATH);
+ return;
+} /* static void email_shutdown (void) */
+#endif /* EMAIL_HAVE_READ */
+