winetest: Make the wrapper immune to Ctrl-C.
This commit is contained in:
parent
7f3439d556
commit
4de19cff1f
|
@ -650,6 +650,16 @@ run_tests (char *logname)
|
||||||
return logname;
|
return logname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL WINAPI ctrl_handler(DWORD ctrl_type)
|
||||||
|
{
|
||||||
|
if (ctrl_type == CTRL_C_EVENT) {
|
||||||
|
printf("Ignoring Ctrl-C, use Ctrl-Break if you really want to terminate\n");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage (void)
|
usage (void)
|
||||||
{
|
{
|
||||||
|
@ -750,6 +760,8 @@ int main( int argc, char *argv[] )
|
||||||
if (!running_on_visible_desktop ())
|
if (!running_on_visible_desktop ())
|
||||||
report (R_FATAL, "Tests must be run on a visible desktop");
|
report (R_FATAL, "Tests must be run on a visible desktop");
|
||||||
|
|
||||||
|
SetConsoleCtrlHandler(ctrl_handler, TRUE);
|
||||||
|
|
||||||
if (reset_env)
|
if (reset_env)
|
||||||
{
|
{
|
||||||
SetEnvironmentVariableA( "WINETEST_PLATFORM", running_under_wine () ? "wine" : "windows" );
|
SetEnvironmentVariableA( "WINETEST_PLATFORM", running_under_wine () ? "wine" : "windows" );
|
||||||
|
|
Loading…
Reference in New Issue