]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
mingw: fix use of undefined USR2 signal
authorVictor Julien <victor@inliniac.net>
Mon, 17 Jul 2017 11:22:58 +0000 (13:22 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 20 Dec 2017 15:23:31 +0000 (16:23 +0100)
src/counters.c
src/detect-engine-loader.c
src/flow-manager.c
src/tm-threads.c

index a13a1c445772e4e28ca54101561c18564f7e5226..bdced6243a5fc07aa8bb317884e679ab6f9c2725 100644 (file)
@@ -323,9 +323,10 @@ static void StatsReleaseCtx(void)
  */
 static void *StatsMgmtThread(void *arg)
 {
+#ifndef OS_WIN32
     /* block usr2.  usr2 to be handled by the main thread only */
     UtilSignalBlock(SIGUSR2);
-
+#endif
     ThreadVars *tv_local = (ThreadVars *)arg;
     uint8_t run = 1;
     struct timespec cond_time;
@@ -410,9 +411,10 @@ static void *StatsMgmtThread(void *arg)
  */
 static void *StatsWakeupThread(void *arg)
 {
+#ifndef OS_WIN32
     /* block usr2.  usr2 to be handled by the main thread only */
     UtilSignalBlock(SIGUSR2);
-
+#endif
     ThreadVars *tv_local = (ThreadVars *)arg;
     uint8_t run = 1;
     ThreadVars *tv = NULL;
index 9438e7096c1e5c9fe340ccffd3d63b6bf4e88189..233bbce3e4a1be020cb686a58923747cf471188d 100644 (file)
@@ -564,9 +564,10 @@ static TmEcode DetectLoaderThreadDeinit(ThreadVars *t, void *data)
 
 static TmEcode DetectLoader(ThreadVars *th_v, void *thread_data)
 {
+#ifndef OS_WIN32
     /* block usr2. usr2 to be handled by the main thread only */
     UtilSignalBlock(SIGUSR2);
-
+#endif
     DetectLoaderThreadData *ftd = (DetectLoaderThreadData *)thread_data;
     BUG_ON(ftd == NULL);
 
index 77bfd9f6b6412b9ca7636b0d1727933697b43fa5..47484f9dc5e47c0c6d25ea3aeabb257c3539bf65 100644 (file)
@@ -658,9 +658,10 @@ static TmEcode FlowManagerThreadDeinit(ThreadVars *t, void *data)
  */
 static TmEcode FlowManager(ThreadVars *th_v, void *thread_data)
 {
+#ifndef OS_WIN32
     /* block usr2.  usr1 to be handled by the main thread only */
     UtilSignalBlock(SIGUSR2);
-
+#endif
     FlowManagerThreadData *ftd = thread_data;
     struct timeval ts;
     uint32_t established_cnt = 0, new_cnt = 0, closing_cnt = 0;
@@ -886,9 +887,10 @@ static TmEcode FlowRecyclerThreadDeinit(ThreadVars *t, void *data)
  */
 static TmEcode FlowRecycler(ThreadVars *th_v, void *thread_data)
 {
+#ifndef OS_WIN32
     /* block usr2. usr2 to be handled by the main thread only */
     UtilSignalBlock(SIGUSR2);
-
+#endif
     struct timeval ts;
     struct timespec cond_time;
     int flow_update_delay_sec = FLOW_NORMAL_MODE_UPDATE_DELAY_SEC;
index ec007a2686be21f797f627e97635fa12da5fe88d..30174245d3e14428ccd43f0d3006a108ce96f559 100644 (file)
@@ -255,9 +255,10 @@ static int TmThreadTimeoutLoop(ThreadVars *tv, TmSlot *s)
 
 static void *TmThreadsSlotPktAcqLoop(void *td)
 {
+#ifndef OS_WIN32
     /* block usr2.  usr2 to be handled by the main thread only */
     UtilSignalBlock(SIGUSR2);
-
+#endif
     ThreadVars *tv = (ThreadVars *)td;
     TmSlot *s = tv->tm_slots;
     char run = 1;
@@ -506,9 +507,10 @@ error:
  */
 static void *TmThreadsSlotVar(void *td)
 {
+#ifndef OS_WIN32
     /* block usr2.  usr2 to be handled by the main thread only */
     UtilSignalBlock(SIGUSR2);
-
+#endif
     ThreadVars *tv = (ThreadVars *)td;
     TmSlot *s = (TmSlot *)tv->tm_slots;
     Packet *p = NULL;
@@ -667,9 +669,10 @@ error:
 
 static void *TmThreadsManagement(void *td)
 {
+#ifndef OS_WIN32
     /* block usr2.  usr2 to be handled by the main thread only */
     UtilSignalBlock(SIGUSR2);
-
+#endif
     ThreadVars *tv = (ThreadVars *)td;
     TmSlot *s = (TmSlot *)tv->tm_slots;
     TmEcode r = TM_ECODE_OK;