BOOL WINAPI win32_ctrlhandler(DWORD dwCtrlType) { #ifdef MULTIPLICITY dTHXa(PERL_GET_SIG_CONTEXT); if (!my_perl) return FALSE; #endif switch(dwCtrlType) { case CTRL_CLOSE_EVENT: /* A signal that the system sends to all processes attached to a console when the user closes the console (either by choosing the Close command from the console window's System menu, or by choosing the End Task command from the Task List */ if (do_raise(aTHX_ 1)) /* SIGHUP */ sig_terminate(aTHX_ 1); return TRUE;