in reply to Tracing or ignoring SIGQUIT and SIGINT

Sorry, but you can't do that on Windows. There is a new(ish) POSIX interface that supports getting the PID of the sender from C, but that is not in the Windows C library so far as I know, and not in Perl.

The INT signal is generated on Windows by <CTRL>C, QUIT is not supported by the Windows C run-time. Therefore it is being faked by Perl. I don't know which event it is, by my guess would be either <CTRL><BREAK> or <CTRL><CLOSE>. Most likely another process is trying to close down the console session. Without knowing why something is doing that I could not say what the impact of ignoring them would be, but if a process really wants to shut you down then it would do a TerminateProcess(), which is the Win32 API called for SIGKILL. There are dangers with calling SIGKILL, like 3rd party DLLs not being shutdown tidily. SIGTERM, which you can handle from Perl, is probably safer.
  • Comment on Re: Tracing or ignoring SIGQUIT and SIGINT