The output:#!perl.exe use strict; use warnings; print scalar localtime, "\n"; eval { $SIG{__DIE__} = sub { alarm(0) }; $SIG{ALRM} = sub { die "timeout" }; alarm(3); sleep 5; alarm(0); }; print $@ if $@; print scalar localtime, "\n";
Fri May 22 17:21:27 2015 timeout at c:\test\test.pl line 9. Fri May 22 17:21:30 2015Is that a new feature in newer Windows versions or does Strawberry Perl implements a workaround for alarm?
In reply to Strawberry Perl and alarm() on Windows by bloonix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |