summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-03-20 01:11:30 +0000
committerChristopher Faylor <me@cgf.cx>2006-03-20 01:11:30 +0000
commitcba9ecfffd3662b1db3a6af0274d2b37e1efa66f (patch)
tree62469cebdffd081828eaa7a0c7f20ca18c072bfc
parentc9b5e2547465df94dcad81bec2d4dc817c11f964 (diff)
downloadcygnal-cba9ecfffd3662b1db3a6af0274d2b37e1efa66f.tar.gz
cygnal-cba9ecfffd3662b1db3a6af0274d2b37e1efa66f.tar.bz2
cygnal-cba9ecfffd3662b1db3a6af0274d2b37e1efa66f.zip
* 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.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/dcrt0.cc5
-rw-r--r--winsup/cygwin/exceptions.cc6
3 files changed, 11 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 17be5b5d8..a87f1945a 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2006-03-19 Christopher Faylor <cgf@timesys.com>
+
+ * 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.
+
2006-03-18 Christopher Faylor <cgf@timesys.com>
* pinfo.h (EXITCODE_OK): Define new constant.
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 52281c9f2..1362e7052 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -707,10 +707,7 @@ dll_crt0_0 ()
child_proc_info = get_cygwin_startup_info ();
if (!child_proc_info)
- {
- memory_init ();
- init_console_handler (!!GetConsoleCP ());
- }
+ memory_init ();
else
{
cygwin_user_h = child_proc_info->user_h;
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