]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/server/util.c: use raise instead of calling signal handler
authorMarc Hoersken <info@marc-hoersken.de>
Sat, 18 Apr 2020 19:42:05 +0000 (21:42 +0200)
committerMarc Hoersken <info@marc-hoersken.de>
Sat, 2 May 2020 15:04:55 +0000 (17:04 +0200)
Use raise to trigger signal handler instead of calling it
directly and causing potential unexpected control flow.

Reviewed-by: Jay Satiro
Part of #5260

tests/server/util.c

index 09bb515b42bc8f2f36119bc970191f10de968cbb..99aa1de40ae185a2fc8d1733d7dded24c40a5ac9 100644 (file)
@@ -632,7 +632,7 @@ static BOOL WINAPI ctrl_event_handler(DWORD dwCtrlType)
   }
   if(signum) {
     logmsg("ctrl_event_handler: %d -> %d", dwCtrlType, signum);
-    exit_signal_handler(signum);
+    raise(signum);
   }
   return TRUE;
 }
@@ -656,7 +656,7 @@ static LRESULT CALLBACK main_window_proc(HWND hwnd, UINT uMsg,
     }
     if(signum) {
       logmsg("main_window_proc: %d -> %d", uMsg, signum);
-      exit_signal_handler(signum);
+      raise(signum);
     }
   }
   return DefWindowProc(hwnd, uMsg, wParam, lParam);