tests/server/util.[ch]: add exit event to stop waiting on Windows

This commit adds a global exit event to the test servers that
Windows-specific wait routines can use to get triggered if the
program was signaled to be terminated, eg. select_ws in sockfilt.c

The exit event will be managed by the signal handling code and is
set to not reset automatically to support multiple wait routines.

Reviewed-by: Jay Satiro
Closes #5260
This commit is contained in:
Marc Hoersken 2020-04-18 21:51:19 +02:00
parent 551577f357
commit 7dc8a981fa
No known key found for this signature in database
GPG key ID: 61E03CBED7BC859E
2 changed files with 24 additions and 0 deletions

View file

@ -70,6 +70,11 @@ extern volatile int got_exit_signal;
/* global variable which if set indicates the first signal handled */
extern volatile int exit_signal;
#ifdef WIN32
/* global event which if set indicates that the program should finish */
extern HANDLE exit_event;
#endif
void install_signal_handlers(bool keep_sigalrm);
void restore_signal_handlers(bool keep_sigalrm);