Commit fbf16357 authored by sof's avatar sof
Browse files

[project @ 2005-04-22 17:50:13 by sof]

Switch to a manual-reset event for the completed-console-event object;
with auto-reset, we ran the risk of leaving it in a signalled state.

Merge to STABLE.
parent c3b7d57d
......@@ -38,7 +38,7 @@ initUserSignals(void)
if (hConsoleEvent == INVALID_HANDLE_VALUE) {
hConsoleEvent =
CreateEvent ( NULL, /* default security attributes */
FALSE, /* auto-reset event */
TRUE, /* manual-reset event */
FALSE, /* initially non-signalled */
NULL); /* no name */
}
......@@ -291,7 +291,9 @@ rts_ConsoleHandlerDone(int ev)
if ( (DWORD)ev == CTRL_BREAK_EVENT ||
(DWORD)ev == CTRL_C_EVENT ) {
/* only these two cause stdin system calls to abort.. */
SetEvent(hConsoleEvent); /* event is auto-reset */
SetEvent(hConsoleEvent); /* event is manual-reset */
Sleep(0); /* yield */
ResetEvent(hConsoleEvent); /* turn it back off again */
}
}
......
Supports Markdown
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