Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Net::OpenSSH cmd not timing out as requested

by pileofrogs (Priest)
on Aug 11, 2010 at 18:04 UTC ( [id://854471]=note: print w/replies, xml ) Need Help??


in reply to Net::OpenSSH cmd not timing out as requested

I'm guessing that 'timeout' is really about giving up if the connection cannot be established. You'll need to add functionality to watch for your process taking too long. Two ways to do this that jump to mind are calling alarm or forking a child. I think perlipc should be helpful.

  • Comment on Re: Net::OpenSSH cmd not timing out as requested

Replies are listed 'Best First'.
Re^2: Net::OpenSSH cmd not timing out as requested
by Only1KW (Sexton) on Aug 11, 2010 at 22:20 UTC

    Well, there's a 'timeout' parameter associated with both the new and capture2 methods, so my guess was that the first timeout dealt with establishing the connection and the second dealt with running the command.

    Alarm looks like it should work for me. I will give it a try. I didn't want to fork as I don't think having a bunch of zombie processes in existance would be much better. And if I first waited for the forked process to complete, then I wouldn't be any better off than I am now.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found