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:
Marc Hoersken 2020-04-18 21:42:05 +02:00
parent 1abb087a9c
commit fe28fcf04c
No known key found for this signature in database
GPG Key ID: 61E03CBED7BC859E
1 changed files with 2 additions and 2 deletions

View 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);