msvcrt: Handle the SIGBREAK signal.

This commit is contained in:
Peter Rosin 2009-12-02 20:21:21 +01:00 committed by Alexandre Julliard
parent 83ec2f4f04
commit f79cd33fc4
2 changed files with 5 additions and 3 deletions

View File

@ -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)

View File

@ -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)