Commit f79cd33f authored by Peter Rosin's avatar Peter Rosin Committed by Alexandre Julliard

msvcrt: Handle the SIGBREAK signal.

parent 83ec2f4f
......@@ -556,6 +556,7 @@ MSVCRT___sighandler_t CDECL MSVCRT_signal(int sig, MSVCRT___sighandler_t func)
case MSVCRT_SIGSEGV:
case MSVCRT_SIGINT:
case MSVCRT_SIGTERM:
case MSVCRT_SIGBREAK:
ret = sighandlers[sig];
sighandlers[sig] = func;
break;
......@@ -582,6 +583,7 @@ int CDECL MSVCRT_raise(int sig)
case MSVCRT_SIGSEGV:
case MSVCRT_SIGINT:
case MSVCRT_SIGTERM:
case MSVCRT_SIGBREAK:
handler = sighandlers[sig];
if (handler == MSVCRT_SIG_DFL) MSVCRT__exit(3);
if (handler != MSVCRT_SIG_IGN)
......
......@@ -37,11 +37,11 @@ static void test_signal(void)
int res;
old = signal(SIGBREAK, sighandler);
todo_wine ok(old != SIG_ERR, "Failed to install signal handler for SIGBREAK\n");
ok(old != SIG_ERR, "Failed to install signal handler for SIGBREAK\n");
test_value = 0;
res = raise(SIGBREAK);
todo_wine ok(res == 0, "Failed to raise SIGBREAK\n");
todo_wine ok(test_value == 1, "SIGBREAK handler not invoked\n");
ok(res == 0, "Failed to raise SIGBREAK\n");
ok(test_value == 1, "SIGBREAK handler not invoked\n");
}
START_TEST(signal)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment