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


in reply to Signal to a sleeping Perl program

I suppose you are on Windows

Kill is not what you want, it seems to ignor $SIG{KILL}

(Win32) kill doesn't send a signal to the identified process like it does on Unix platforms. Instead kill($sig, $pid) terminates the process identified by $pid , and makes it exit immediately with exit status $sig . As in Unix, if $sig is 0 and the specified process exists, it returns true without actually terminating it.

and mixing alarm and sleep doesn't work well:

It is usually a mistake to intermix alarm and sleep calls, because sleep may be internally implemented on your system with alarm.

so talexb's suggestion seems spot on Re: Signal to a sleeping Perl program

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice