From cba9ecfffd3662b1db3a6af0274d2b37e1efa66f Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 20 Mar 2006 01:11:30 +0000 Subject: * 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. --- winsup/cygwin/exceptions.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/exceptions.cc') diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index dabfeab62..279223e58 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -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 -- cgit v1.2.3