This is caused by the 'safe signals' that were introduced by 5.8.0. The sleep is treated a single opcode and so the signal is not seen until after the opcode completes. See the 'safe signals' section of perl58delta. Also see perl581delta for how to bypass this and get the old unsafe behaviour back.
c:\test>set PERL_SIGNALS=unsafe c:\test>p1 [0] Perl> $SIG{ INT } = sub{ print 'Caught signal INT'; };; [0] Perl> print 'still here' while sleep 10;; still here Caught signal INT still here Terminating on signal SIGBREAK(21)
In reply to Re: win32, ctrl-c, sleep, and signals
by BrowserUk
in thread win32, ctrl-c, sleep, and signals
by SirBones
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |