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>2003-09-12 10:41:53 +0400
committerChristopher Faylor <me@cgf.cx>2003-09-12 10:41:53 +0400
commitfb3dd716764e26ddfd105cec227a689b97ddae91 (patch)
tree252367f97a5b7b7f1725825c590ef08629dab6d1 /winsup/cygwin/exceptions.cc
parent3a256354895af562cd86392c8d8c502ac4e73dc0 (diff)
* dcrt0.cc (_dll_crt0): Accommodate breaking apart of early_stuff_init.
* exceptions.cc (early_stuff_init): Delete. (init_console_handler): New function - top half of early_stuff_init. (init_global_security): New function - bottom half of early_stuff_init. (sig_handle): Avoid special hExeced test for SIGINT. Just terminate the captive process. (signal_exit): Add debugging output. * fhandler_tty.cc (fhandler_tty_slave::open): Don't allocate a console if one already seems to exist. Properly initialize ctrl-c handling if we do allocate a console. * winsup.h (early_stuff_init): Delete declaration. (init_console_handler): New declaration. (init_global_security): New declaration.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 8105eb653..c1743d239 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -115,12 +115,16 @@ init_exception_handler (exception_list *el)
#endif
void
-early_stuff_init ()
+init_console_handler ()
{
(void) SetConsoleCtrlHandler (ctrl_c_handler, FALSE);
if (!SetConsoleCtrlHandler (ctrl_c_handler, TRUE))
system_printf ("SetConsoleCtrlHandler failed, %E");
+}
+void
+init_global_security ()
+{
/* Initialize global security attribute stuff */
sec_none.nLength = sec_none_nih.nLength =
@@ -1024,7 +1028,7 @@ sig_handle (int sig)
if (handler == (void *) SIG_DFL)
{
if (sig == SIGCHLD || sig == SIGIO || sig == SIGCONT || sig == SIGWINCH
- || sig == SIGURG || (hExeced && sig == SIGINT))
+ || sig == SIGURG)
{
sigproc_printf ("default signal %d ignored", sig);
goto done;
@@ -1107,7 +1111,10 @@ signal_exit (int rc)
user_data->resourcelocks->Init ();
if (hExeced)
- TerminateProcess (hExeced, rc);
+ {
+ sigproc_printf ("terminating captive process");
+ TerminateProcess (hExeced, rc);
+ }
sigproc_printf ("about to call do_exit (%x)", rc);
(void) SetEvent (signal_arrived);