develooper Front page | perl.perl5.porters | Postings from May 2019

[perl #122112] refcnt: fd -1 < 0 with MIME::Lite

From:
Tony Cook via RT
Date:
May 9, 2019 01:41
Subject:
[perl #122112] refcnt: fd -1 < 0 with MIME::Lite
Message ID:
rt-4.0.24-21555-1557366068-1498.122112-15-0@perl.org
On Tue, 29 May 2018 22:54:52 -0700, tonyc wrote:
> On Mon, 07 Jul 2014 12:48:51 -0700, vsespb wrote:
> > Perl_my_pclose should continue and run wait4pid loop, but
> > PerlIO_close
> > should be skipped.
> >
> > Also, "if (fd < 0) {" can be improved like
> > "if we are in signal handler which is called from Perl_my_pclose for
> > same filehandle".
> > (disclaimer: totally not sure how it's possible to implement in terms
> > of perl internals)
> 
> The attached fixes this specific problem.
> 
> It does leave the PerlIO handle in the IO SV IFP slot, so if someone
> attempts to use the handle after an interruptted pipe close they might
> still have problems.

I think the attached is a better solution, as detailed in the commit message.

Tony


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=122112



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About