From: Nick Ing-Simmons Date: Fri, 11 Jan 2002 20:58:20 +0000 (+0000) Subject: Install dummy signal() handlers for Win32's SIGINT and SIGBREAK X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f646a69a049030ff75ef540aa2c16835b7972cc1;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/win32/win32.c b/win32/win32.c index b3e6b8c..7df339d 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); }