RE: [Ssh-sftp-perl-users] Net::SSH::Perl hanging
Brought to you by:
dbrobins
From: David R. <dr...@at...> - 2005-02-25 19:21:35
|
Please log this as a bug on rt.cpan.org, with as much detail as you = think necessary, including information about which systems it works on = and which it doesn't (e.g. OS, server and version, any nonstandard = configuration options). This will make it more visible, and I or = another developer are more likely to resolve it, either with a fix (if = possible) or some documentation as to why it doesn't work as expected. One workaround might be to have the command itself do the forking, = perhaps using something like nohup so the program that's started doesn't = get killed when the shell/terminal session close. I'm moving shortly so don't be able to get to it myself until after the = move., and logging the bug in RT helps the problem stay visible. As always patches are welcome :). -----Original Message----- From: ssh...@li... on behalf of Chris = r Sent: Tue 2/22/2005 6:07 PM To: ssh...@li... Cc:=09 Subject: [Ssh-sftp-perl-users] Net::SSH::Perl hanging I've got a script that connects to various servers to run some admin commands. It works for the most part, but upon hitting certain servers it seems to hang waiting for the command to finish. im just using the standard syntax...=20 $ssh =3D Net::SSH::Perl->new($BACKSERVER, port =3D> '22'); $ssh->login("$user", "$pass"); ($out, $err, $exit) =3D $ssh->cmd("somecommand"); I've tried piping and sending the command output to the background and null, it helps on one server but not another and my script hangs unable to finish. ($out, $err, $exit) =3D $ssh->cmd("somecommand &"); ($out, $err, $exit) =3D $ssh->cmd("somecommand > /dev/null &"); Any workarounds on how to get the command to return and continue on with execution would help. Thanks. |