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

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

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
May 30, 2019 00:36
Subject:
[perl #122112] refcnt: fd -1 < 0 with MIME::Lite
Message ID:
rt-4.0.24-18172-1559176579-1940.122112-15-0@perl.org
On Wed, 08 May 2019 18:41:08 -0700, tonyc wrote:
> 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.

Test case applied as fb5e77103dd443cc2112ba14dc665aa5ec072ce6 and the simple fix as 35608a1658fe75c79ca53d96aea6cf7cb2a98615.

Tony

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

Thread Previous | Thread Next


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