Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Workaround of Timeout on https

by starbolin (Hermit)
on May 15, 2008 at 16:45 UTC ( [id://686773]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Workaround of Timeout on https
in thread Workaround of Timeout on https

Not all processes in the network stack are interruptible. Perl can't process an ALRM signal until control is returned to the perl interpreter. One partial remediation is to break up the task into small chunks. ie. Perform DNS queries first and pinging the server before issuing GETs.

The only sure 'workaround' is to fork a child to handle the network communication. This allows the parent to time-out and leave the children to the reaper.


s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://686773]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-25 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found