Tue Jul 13 12:59:28 2010: Request 59322 was acted upon.
Transaction: Ticket created by CHM
Queue: Win32-Console
Subject: SetConsoleCtrlHandler function not supported
Broken in: 0.09
Severity: Important
Owner: Nobody
Requestors: [email protected]
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=59322 >
A persistent and pernicious problem with using perl
from the win32 console is the fact that Ctrl-C can
not be caught. This makes it very difficult to implement
cross-platform code that works on win32.
If SetConsoleCtrlHandler() were available to handle
these "signals" that would prevent Ctrl-C in a
Term::ReadLine::Perl session in a CMD shell window
from killing the perl instance and even the CMD
shell if the exit routine query is not answered
in the negative.
I notice that there is commented out code for just
this in the 0.09 version of Win32::Console. Is
there a reason it was not enabled? Even a limited
implementation that keeps perl and the CMD shell
from exiting would be a huge win.
--Chris