mirror of https://github.com/moparisthebest/curl
tests/server/util.c: use raise instead of calling signal handler
Use raise to trigger signal handler instead of calling it directly and causing potential unexpected control flow. Reviewed-by: Jay Satiro Part of #5260
This commit is contained in:
parent
1abb087a9c
commit
fe28fcf04c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue