summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-01-11 20:58:20 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-01-11 20:58:20 +0000
commitf646a69a049030ff75ef540aa2c16835b7972cc1 (patch)
treed2c2dcf80d65b94e1181864a8e960c12bc3c6628 /win32
parentef130326245aa7fe973aebf799139d47c3591ddd (diff)
downloadperl-f646a69a049030ff75ef540aa2c16835b7972cc1.tar.gz
Install dummy signal() handlers for Win32's SIGINT and SIGBREAK
as C runtime seems to get its hands on them even though we said they were handled. Still an issue with "die" out of signal handler - get panic: pp_iter p4raw-id: //depot/perlio@14196
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c
index b3e6b8cad9..7df339d9cf 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -4533,6 +4533,15 @@ win32_get_child_IO(child_IO_table* ptbl)
#ifdef HAVE_INTERP_INTERN
+static void
+win32_csighandler(int sig)
+{
+#if 0
+ dTHXa(PERL_GET_SIG_CONTEXT);
+ Perl_warn(aTHX_ "Got signal %d",sig);
+#endif
+ /* Does nothing */
+}
void
Perl_sys_intern_init(pTHX)
@@ -4551,8 +4560,8 @@ Perl_sys_intern_init(pTHX)
w32_init_socktype = 0;
if (my_perl == PL_curinterp) {
/* Force C runtime signal stuff to set its console handler */
- signal(SIGINT,SIG_DFL);
- signal(SIGBREAK,SIG_DFL);
+ signal(SIGINT,&win32_csighandler);
+ signal(SIGBREAK,&win32_csighandler);
/* Push our handler on top */
SetConsoleCtrlHandler(win32_ctrlhandler,TRUE);
}