* dcrt0.cc (dll_crt0_0): Don't bother with setting init_console_handler here

since it will be set later when we discover if we have a ctty or not.
* exceptions.cc (init_console_handler): Properly remove NULL handler.
This commit is contained in:
Christopher Faylor
2006-03-20 01:11:30 +00:00
parent c9b5e25474
commit cba9ecfffd
3 changed files with 11 additions and 7 deletions

View File

@ -104,8 +104,9 @@ init_console_handler (bool install_handler)
{
BOOL res;
while (SetConsoleCtrlHandler (ctrl_c_handler, FALSE))
continue;
SetConsoleCtrlHandler (ctrl_c_handler, FALSE);
if (wincap.has_null_console_handler_routine ())
SetConsoleCtrlHandler (NULL, FALSE);
if (install_handler)
res = SetConsoleCtrlHandler (ctrl_c_handler, TRUE);
else if (wincap.has_null_console_handler_routine ())
@ -114,7 +115,6 @@ init_console_handler (bool install_handler)
res = SetConsoleCtrlHandler (dummy_ctrl_c_handler, TRUE);
if (!res)
system_printf ("SetConsoleCtrlHandler failed, %E");
return;
}
extern "C" void