Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: A better way to test network elements

by ajwans (Scribe)
on Mar 07, 2002 at 21:34 UTC ( [id://150140]=note: print w/replies, xml ) Need Help??


in reply to A better way to test network elements

Forking does not seem to be the optimal solution to this. I would prefer to set a handler for SIGALRM and set an alarm, something like.

$SIG{ALRM} = sub { die ("Couldn't traceroute"); }; alarm (20); if ($tracert = `traceroute "$ip"`) { alarm (0); } # handle data from traceroute here


This is documented in the perlipc perldoc.

1. dude, what does mine say?
2. "sweet", what about mine?
3. "dude", what does mine say?
4. GOTO 2

Log In?
Username:
Password:

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

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

    No recent polls found