win32, ctrl-c, sleep, and signalsby SirBones (Friar)
|on May 30, 2006 at 15:06 UTC||Need Help??|
SirBones has asked for the
wisdom of the Perl Monks concerning the following question:
Hey folks. I asked a question in the CB the other day, and thought via bart's help I had it solved. But as I play more I've run into more questions. Have looked around a bit (i.e., in 436492 and some of its links, and elsewhere) but really haven't found an explanation. I certainly apologize in advance if this has been answered in some obvious place.
To start with the obvious. On win32:
Pressing ctrl-C results in a (virtually) instantaneous:
Fine. Now this:
If I run this on my win32 system, and issue a ctrl-C, the handler does not display its expected response until after the sleep has finished (about 30 seconds later). On Linux, the sleep is broken immediately and the handler runs right away (as I would expect).
I'm confused. It seems that the first example shows that indeed a ctrl-C under win32 is (as expected) breaking into the sleep properly. If this is the case, where the heck has the program control gone in the second example? Where exactly are things between the time of the ctrl-C and when the sleep ends and the handler runs?
I'm on Windows XP Pro, SP 1. My Perl v5.8.7, ActiveState binary build 815.
Correction: Moved up my system info, and clarified sleep behavior.
"This bounty hunter is my kind of scum: Fearless and inventive." --J.T. Hutt