in reply to Net::SFTP::Foreign message on disconnect

Thank you. It also works for me but I was not using sftp->disconnect(), only the sftp->new. At the end of the script I used undef $sftp, it worked for linux OS but not for Soloris. It was annoying me a lot for long time.
  • Comment on Re: Net::SFTP::Foreign message on disconnect

Replies are listed 'Best First'.
Re^2: Net::SFTP::Foreign message on disconnect
by mrdvt92 (Acolyte) on May 23, 2016 at 15:16 UTC
    I ramdomly get "Killed by signal 15." on STDERR as well. I've added these two lines to see if this will resolve my issues. My next step will be to localize the signal.
    $sftp->disconnect; #try to avoid random error "Killed by signal 15." undef $sftp;
    Version
    $ rpm -q --whatprovides 'perl(Net::SFTP::Foreign)' perl-Net-SFTP-Foreign-1.75-1.el6.noarch
      Bug: https://rt.cpan.org/Public/Bug/Display.html?id=78517