in reply to Re: Odd bug - Sleep 1 cures CGI proxy issue - But Why???
in thread Odd bug - Sleep 1 cures CGI proxy issue - But Why???

If that's the problem, select(undef,undef,undef,2) is a good alternative.

Another possibility is that the delivery of the ALRM signal is what's fixing the problem. Maybe kill $$,'CONT' will achieve the same thing without the pause.

Not that either of these is a good long-term solution, but knowing that one fixes the problem and one doesn't might help point you to why it's getting stuck.