http://qs321.pair.com?node_id=1127481


in reply to Strawberry Perl and alarm() on Windows

Also works in Strawberry 5.14.2 on Win7-64.

alarm says: Emulated using timers that must be explicitly polled whenever Perl wants to dispatch "safe signals" and therefore cannot interrupt blocking system calls. (Win32). And sleep says: Emulated using synchronization functions such that it can be interrupted by alarm(), and limited to a maximum of 4294967 seconds, approximately 49 days. (Win32)

So, yes, mixing alarm and sleep works on Win32. Replace sleep with something that blocks for 5 seconds outside perl (i.e. in the system) and alarm will no longer work.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)