KERNEL/tests: don't send signal to console NULL handler [#2]
Saulius Krasuckas
saulius2 at ar.fi.lt
Sat Oct 22 02:33:57 CDT 2005
The same typo detected: 8000000 vs 0x80000000. ;-)))
Resubmitting.
Log message:
Saulius Krasuckas <saulius.krasuckas at ieee.org>
Don't send a CTRL_C_EVENT signal to console if we are on Win9x and
console signal handler is set to NULL.
Index: dlls/kernel/tests/console.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/tests/console.c,v
retrieving revision 1.10
diff -p -u -r1.10 console.c
--- dlls/kernel/tests/console.c 28 Jan 2005 14:02:52 -0000 1.10
+++ dlls/kernel/tests/console.c 21 Oct 2005 13:36:43 -0000
@@ -537,10 +537,14 @@ static void testCtrlHandler(void)
#endif
ok(WaitForSingleObject(mch_event, 3000) == WAIT_OBJECT_0, "event sending didn't work\n");
CloseHandle(mch_event);
+
+ /* Turning off ctrl-c handling doesn't work on win9x such way ... */
ok(SetConsoleCtrlHandler(NULL, TRUE), "Couldn't turn off ctrl-c handling\n");
mch_event = CreateEventA(NULL, TRUE, FALSE, NULL);
mch_count = 0;
- ok(GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0), "Couldn't send ctrl-c event\n");
+ if(!(GetVersion() & 0x80000000))
+ /* ... and next line leads to an unhandled exception on 9x. Avoid it on 9x. */
+ ok(GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0), "Couldn't send ctrl-c event\n");
ok(WaitForSingleObject(mch_event, 3000) == WAIT_TIMEOUT && mch_count == 0, "Event shouldn't have been sent\n");
CloseHandle(mch_event);
ok(SetConsoleCtrlHandler(mch, FALSE), "Couldn't remove handler\n");
More information about the wine-patches
mailing list