in reply to Strange behaviour with SSH command launched with open
If you have a look at the help for system it says :-
If you'd like to manually inspect "system"'s failure, you can
check all possible failure modes by inspecting $? like this:
if ($? == -1) {
print "failed to execute: $!\n";
}
elsif ($? & 127) {
printf "child died with signal %d, %s coredump\n",
($? & 127), ($? & 128) ? 'with' : 'without';
}
else {
printf "child exited with value %d\n", $? >> 8;
}
Which will give you 'child exited with value 255', so ssh failed returning -1, therefore check your ssh setup.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Strange behaviour with SSH command launched with open
by smutel (Initiate) on Jun 04, 2014 at 10:54 UTC | |
by RichardK (Parson) on Jun 04, 2014 at 11:36 UTC | |
|
Re^2: Strange behaviour with SSH command launched with open
by smutel (Initiate) on Jun 04, 2014 at 13:02 UTC |