in reply to Re^3: Problem with Net::SSH::Expect on unavailable hosts
in thread Problem with Net::SSH::Expect on unavailable hosts
The docs for run_ssh() further state " boolean: 1 if the ssh ran OK or 0 otherwise. In case of failures, use $! to do get info." Note the tense and order. $! is meaningless unless run_ssh() returned a failure code. It wouldn't return a failure code if the SSH session was started successfully, and doesn't return success until and unless it was started successfully.
$! is absolutely meaningless regarding the success of run_ssh(), as it will not get populated by run_ssh() except on failure.
Why do you seem to think that run_ssh() is run asynchonously and does not block? It's the SSH connection that's supposed to be in a separate process per the docs, not run_ssh() itself.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Problem with Net::SSH::Expect on unavailable hosts
by jrsimmon (Hermit) on Jul 01, 2009 at 22:14 UTC |