<E>nter-message command in the text client now warns the user that this creates a...
[citadel.git] / citadel / threads.c
index 5cb70334c0b9fc13703045236de963ac55c899de..4da15e6fb650a4985fa5b4161df92e17706f535a 100644 (file)
@@ -138,7 +138,7 @@ void CtdlThreadCreate(void *(*start_routine)(void*))
        ret = pthread_attr_init(&attr);
        ret = pthread_attr_setstacksize(&attr, THREADSTACKSIZE);
        ret = pthread_create(&thread, &attr, CTC_backend, (void *)start_routine);
-       if (ret != 0) syslog(LOG_EMERG, "pthread_create() : %s", strerror(errno));
+       if (ret != 0) syslog(LOG_ERR, "pthread_create() : %m");
 }
 
 
@@ -146,17 +146,14 @@ void InitializeMasterTSD(void) {
        memset(&masterTSD, 0, sizeof(struct thread_tsd));
 }
 
-extern void ShutDownEventQueues(void);
 
-int EventQShuttingDown = 0;
-int EVQShutDown = 0;
 /*
  * Initialize the thread system
  */
 void go_threading(void)
 {
        if (pthread_key_create(&ThreadKey, NULL) != 0) {
-               syslog(LOG_EMERG, "pthread_key_create() : %s", strerror(errno));
+               syslog(LOG_ERR, "pthread_key_create() : %m");
                abort();
        }
 
@@ -179,15 +176,6 @@ void go_threading(void)
        }
 
        /* When we get to this point we are getting ready to shut down our Citadel server */
-       if (!EventQShuttingDown)
-       {
-               EventQShuttingDown = 1;
-               ShutDownEventQueues();
-       }
-       while (!EVQShutDown)
-               usleep(1000000);
-
-
        terminate_all_sessions();               /* close all client sockets */
        CtdlShutdownServiceHooks();             /* close all listener sockets to prevent new connections */
        PerformSessionHooks(EVT_SHUTDOWN);      /* run any registered shutdown hooks */