Posted on 2007-11-14 20:31:27-08 by cberry in response to 6452
Re: alarms don't work on vms

Yes they do. See longer response at:


https://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1177355

The gist of it is that you have two unrelated problems. If you want want the accept() to time out you have to set a timeout before calling it, like so:


$server->timeout(30);

Whether an alarm causes a syscall to return is implementation defined and unrelated to the timeout problem, though you can shorten the timeout and requeue the accept if you want and thus have no need for the alarm. Perl's deferred signals prevent signal delivery until the current opcode completes; you can avoid signal deferral by using POSIX::sig_action, but it's not recommended.

Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.