Thanks for your explanations. The version I am using is the one from
rpmforge, an unofficial Centos repository.
I'm not quite sure what version it is! Centos maintainers advise against
installing directly from CPAN etc, as it can create obscure conflicts. I
don't really know why this is, but as I have an adequate workaround, I am
reluctant to go against their advice.
I reported it just to help other people who might have the same problem.
On 26 August 2013 14:12, Salvador \"Fandiño\" via RT <
bug-Net-SFTP-Foreign@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=88005 >
>
>
>
>
>
>
> ----- Original Message -----
> > From: "Salvador \"Fandiño\" via RT" <bug-Net-SFTP-Foreign@rt.cpan.org>
> > To:
> > Cc:
> > Sent: Monday, August 26, 2013 12:34 PM
> > Subject: Re: [rt.cpan.org #88005] error message when program exits
> >
> > Queue: Net-SFTP-Foreign
> > Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=88005 >
> >
> >
> >
> >
> >
> > ----- Original Message -----
> >> From: Stephen Wylie via RT <bug-Net-SFTP-Foreign@rt.cpan.org>
> >> To:
> >> Cc:
> >> Sent: Wednesday, August 21, 2013 5:36 PM
> >> Subject: [rt.cpan.org #88005] error message when program exits
> >>
> >> Wed Aug 21 11:36:08 2013: Request 88005 was acted upon.
> >> Transaction: Ticket created by stephen@lingraywatches.co.uk
> >> Queue: Net-SFTP-Foreign
> >> Subject: error message when program exits
> >> Broken in: (no value)
> >> Severity: (no value)
> >> Owner: Nobody
> >> Requestors: stephen@lingraywatches.co.uk
> >> Status: new
> >> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=88005 >
> >>
> >>
> >> It says 'Killed by signal 1.'
> >
> > That means that the SSH process is getting a HUP signal.
> >
> >> This can be avoided by using the disconnect
> >> method, so the problem is really only in the documentation which
> advises
> >> that disconnect shouldn't normally be used. I'm running a program
> > every
> >> 5
> >> minutes on the cron, and getting an email every time, due to the ssh
> >> process being killed.
> >
> >
> > I guess you are using password authentication and storing the
> Net::SFTP::Foreign
> > object in a global variable instead of a lexical one (or otherwise, that
> some
> > reference is keep in some way to the object until global destruction).
> >
> > If the SFTP object reaches the global destruction phase, it may be
> destroyed
> > after the IO::Pty object handling the ssh process pty and that would
> cause the
> > delivering of the HUP signal.
> >
> > If that is the problem, the documentation would be right, as it says
> that the
> > conneciton is closed automatically when the object goes out of scope, the
> > problem being that actually, in your case, it never goes out of scope.
>
> I have released a new version that includes a work-around for that issue.
>
> Could you try it?
>
>
https://metacpan.org/release/SALVA/Net-SFTP-Foreign-1.76_03
>
>
--
"It is human nature to think wisely and act in an absurd fashion." -
Anatole France