[Ssh-sftp-perl-users] Server process ends but client never gets the message
Brought to you by:
dbrobins
From: Vanole, M. <MV...@at...> - 2008-10-19 17:55:50
|
Hi, I'm using Net::SSH::Perl to submit processes from Solaris to Windows Server 2003. Both client and server are running OpenSSH. My issue may not be related to ssh or Net::SSH::Perl but I need to begin with what I know. I am submitting very long running process to the server (Win) that may take hours to complete. What I have noticed is that the process is completing on the Windows side, but the Solaris side never stops "running". It's as if the connection stays open indefinitely waiting for the server process to exit. What I need is for the client program to end when the server process I initiate completes - which is what happens for processes that run inside 60 minutes (although I have had a six hour process complete as expected). I can use the sleep command to recreate this. $cmd = 'sleep 18000'; #5 hours %ssh_params = (identity_files => ["/home/user/.ssh/id_rsa"], protocol=> 2, debug => 0); $server = Net::SSH::Perl->new($hostname, %ssh_params); $server->login($username); ($stdout, $stderr, $exit) = $server->cmd($cmd); print "$exit\n"; # Never get to this point I've look at the various keeplive parameters, but none seem to address this. I would expect a long running process to appear idle so that the client disconnects, but not the other way around. Any advice on my next direction toward figuring this out is greatly appreciated. Thanks, Mike |