Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-09-02 08:46:51 +0400
committerChristopher Faylor <me@cgf.cx>2005-09-02 08:46:51 +0400
commit7a1bf10a8433261a1dd4ae86b76750716d358569 (patch)
treeb7afc8189706eba8c9e0ccca56ca61c7cda00013 /winsup/cygwin/exceptions.cc
parent062c2fa42f64aef80615e433af44028332b34ca8 (diff)
bad_addresses
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 852b5019f..71a8b7513 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -123,7 +123,8 @@ void
init_console_handler (BOOL install_handler)
{
BOOL res;
- SetConsoleCtrlHandler (ctrl_c_handler, FALSE);
+ while (SetConsoleCtrlHandler (ctrl_c_handler, FALSE))
+ continue;
if (install_handler)
res = SetConsoleCtrlHandler (ctrl_c_handler, TRUE);
else if (wincap.has_null_console_handler_routine ())
@@ -833,6 +834,7 @@ has_visible_window_station ()
static BOOL WINAPI
ctrl_c_handler (DWORD type)
{
+console_printf ("%u OUCH!\n", GetCurrentProcessId ());
static bool saw_close;
if (!cygwin_finished_initializing)
@@ -845,6 +847,11 @@ ctrl_c_handler (DWORD type)
_my_tls.remove (INFINITE);
+#if 0
+ if (type == CTRL_C_EVENT || type == CTRL_BREAK_EVENT)
+ proc_subproc (PROC_KILLFORKED, 0);
+#endif
+
/* Return FALSE to prevent an "End task" dialog box from appearing
for each Cygwin process window that's open when the computer
is shut down or console window is closed. */