2005-06-29 Christopher Faylor <cgf@timesys.com>
+ * cygerrno.h: Make multi-inclusion safe.
+ * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Deal with EINTR.
+ * dcrt0.cc (dll_crt0_0): Accommodate init_console_handler argument
+ change.
+ * winsup.h: Ditto.
+ * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
+ * exceptions.cc (init_console_handler): Ditto. Ignore console events
+ if we're not attached to a terminal.
+ * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
+ * wincap.cc: Implement has_null_console_handler_routine throughout.
+ * wincap.h: Ditto.
+
+2005-06-29 Christopher Faylor <cgf@timesys.com>
+
* autoload.cc (LoadDLLprime): Use a more descriptive name for autoload
text sections.
* cygwin.sc: Ditto.
init_exception_handler (el, handle_exceptions);
}
+BOOL WINAPI
+dummy_ctrl_c_handler (DWORD dwCtrlType)
+{
+ return TRUE;
+}
+
void
-init_console_handler ()
+init_console_handler (BOOL install_handler)
{
+ BOOL res;
(void) SetConsoleCtrlHandler (ctrl_c_handler, FALSE);
- if (!SetConsoleCtrlHandler (ctrl_c_handler, TRUE))
+ if (install_handler)
+ res = SetConsoleCtrlHandler (ctrl_c_handler, TRUE);
+ else if (wincap.has_null_console_handler_routine ())
+ res = SetConsoleCtrlHandler (NULL, TRUE);
+ else
+ res = SetConsoleCtrlHandler (dummy_ctrl_c_handler, TRUE);
+ if (!res)
system_printf ("SetConsoleCtrlHandler failed, %E");
}
start_proc_suspended:true,
has_extended_priority_class:false,
has_guid_volumes:false,
- detect_win16_exe:true
+ detect_win16_exe:true,
+ has_null_console_handler_routine:false
};
static NO_COPY wincaps wincap_95 = {
start_proc_suspended:true,
has_extended_priority_class:false,
has_guid_volumes:false,
- detect_win16_exe:true
+ detect_win16_exe:true,
+ has_null_console_handler_routine:false
};
static NO_COPY wincaps wincap_95osr2 = {
start_proc_suspended:true,
has_extended_priority_class:false,
has_guid_volumes:false,
- detect_win16_exe:true
+ detect_win16_exe:true,
+ has_null_console_handler_routine:false
};
static NO_COPY wincaps wincap_98 = {
start_proc_suspended:true,
has_extended_priority_class:false,
has_guid_volumes:false,
- detect_win16_exe:true
+ detect_win16_exe:true,
+ has_null_console_handler_routine:false
};
static NO_COPY wincaps wincap_98se = {
start_proc_suspended:true,
has_extended_priority_class:false,
has_guid_volumes:false,
- detect_win16_exe:true
+ detect_win16_exe:true,
+ has_null_console_handler_routine:false
};
static NO_COPY wincaps wincap_me = {
start_proc_suspended:true,
has_extended_priority_class:false,
has_guid_volumes:false,
- detect_win16_exe:true
+ detect_win16_exe:true,
+ has_null_console_handler_routine:false
};
static NO_COPY wincaps wincap_nt3 = {
start_proc_suspended:false,
has_extended_priority_class:false,
has_guid_volumes:false,
- detect_win16_exe:false
+ detect_win16_exe:false,
+ has_null_console_handler_routine:true
};
static NO_COPY wincaps wincap_nt4 = {
start_proc_suspended:false,
has_extended_priority_class:false,
has_guid_volumes:false,
- detect_win16_exe:false
+ detect_win16_exe:false,
+ has_null_console_handler_routine:true
};
static NO_COPY wincaps wincap_nt4sp4 = {
start_proc_suspended:false,
has_extended_priority_class:false,
has_guid_volumes:false,
- detect_win16_exe:false
+ detect_win16_exe:false,
+ has_null_console_handler_routine:true
};
static NO_COPY wincaps wincap_2000 = {
start_proc_suspended:false,
has_extended_priority_class:true,
has_guid_volumes:true,
- detect_win16_exe:false
+ detect_win16_exe:false,
+ has_null_console_handler_routine:true
};
static NO_COPY wincaps wincap_xp = {
start_proc_suspended:false,
has_extended_priority_class:true,
has_guid_volumes:true,
- detect_win16_exe:false
+ detect_win16_exe:false,
+ has_null_console_handler_routine:true
};
static NO_COPY wincaps wincap_2003 = {
start_proc_suspended:false,
has_extended_priority_class:true,
has_guid_volumes:true,
- detect_win16_exe:false
+ detect_win16_exe:false,
+ has_null_console_handler_routine:true
};
wincapc wincap;