Now signals will stop the server again.
authorDave West <davew@uncensored.citadel.org>
Fri, 30 Nov 2007 21:20:14 +0000 (21:20 +0000)
committerDave West <davew@uncensored.citadel.org>
Fri, 30 Nov 2007 21:20:14 +0000 (21:20 +0000)
citadel/include/ctdl_module.h
citadel/server_main.c
citadel/sysdep.c

index 7813514339e66d877ab6b2af707c54fa66e65409..cce4906cce90ad7b7f435cdbd00f18698d3afe7b 100644 (file)
@@ -111,7 +111,7 @@ void CtdlModuleStartCryptoMsgs(char *ok_response, char *nosup_response, char *er
 struct CtdlThreadNode *CtdlThreadCreate(char *name, long flags, void *(*thread_func) (void *arg), void *args);
 void CtdlThreadSleep(int secs);
 void CtdlThreadStop(struct CtdlThreadNode *thread);
-int CtdlThreadCheckStop(struct CtdlThreadNode *thread);
+int CtdlThreadCheckStop(struct CtdlThreadNode *this_thread);
 void CtdlThreadCancel(struct CtdlThreadNode *thread);
 char *CtdlThreadName(struct CtdlThreadNode *thread, char *name);
 struct CtdlThreadNode *CtdlThreadSelf(void);
index 67102a2061e338458fd318b6fa05d7406c00f784..8634d6c0d0b2b7359bb75f4cb5f7336e6e7e35e1 100644 (file)
@@ -350,6 +350,8 @@ int main(int argc, char **argv)
        
        while (CtdlThreadGetCount())
        {
+               if (exit_signal)
+                       CtdlThreadStopAll();
                begin_critical_section(S_THREAD_LIST);
                ctdl_thread_internal_calc_loadavg();
                end_critical_section(S_THREAD_LIST);
index c521057f956b54f5cbaf53ba51afa32080556da8..625c4241a5e37310ca403d2eed6d61709ee9b1f8 100644 (file)
@@ -1997,9 +1997,9 @@ do_select:        force_purge = 0;
                                goto do_select;
                        }
                }
-               else if(retval == 0) {
-                       goto SKIP_SELECT;
-               }
+//             else if(retval == 0) {
+//                     goto SKIP_SELECT;
+//             }
                /* Next, check to see if it's a new client connecting
                 * on a master socket.
                 */