]> code.citadel.org Git - citadel.git/blobdiff - citadel/threads.c
* we moved to COPYING instead of copyright.txt due to the request of debian; these...
[citadel.git] / citadel / threads.c
index a24e03289e74121b826d57856c09d63a2d17649c..489fa416dc9c000fdb31ae54b27ed991f4ac931f 100644 (file)
@@ -2,12 +2,15 @@
  * $Id: sysdep.c 5882 2007-12-13 19:46:05Z davew $
  *
  * Citadel "system dependent" stuff.
- * See copyright.txt for copyright information.
+ * See COPYING for copyright information.
  *
  * Here's where we have the Citadel thread implimentation
  *
  */
 
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
 #include <sys/types.h>
 #include <errno.h>
 #include <sys/socket.h>
@@ -26,6 +29,8 @@
 # endif
 #endif
 
+#include <libcitadel.h>
+
 #include "threads.h"
 #include "ctdl_module.h"
 #include "modules_init.h"
@@ -1096,6 +1101,10 @@ void ctdl_thread_internal_check_scheduled(void)
        CtdlThreadNode *this_thread, *that_thread;
        time_t now;
        
+       /* Don't start scheduled threads if the system wants single user mode */
+       if (CtdlWantSingleUser())
+               return;
+       
        if (try_critical_section(S_SCHEDULE_LIST))
                return; /* If this list is locked we wait till the next chance */