Bug#350991: perl-modules: perl segfaults under "PERLIO=stdio"
Niko Tyni
ntyni at iki.fi
Mon Apr 17 19:49:35 UTC 2006
On Thu, Apr 13, 2006 at 09:23:33PM +0300, Niko Tyni wrote:
> the segfault actually happens in Term::Readline::Gnu, and it's a side
> effect of the fix for #236018.
>
> I'll try to come up with a better patch.
The attached patch is an even worse kludge than the previous fix. I'm
wondering whether I should rather revert the previous one and blame
the Perl debugger.
I'll get back to this later, but here's the patch for reference.
Cheers,
--
Niko Tyni ntyni at iki.fi
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## 30outstream.dpatch by Niko Tyni <ntyni at iki.fi>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix SIGSEGV after "|" command. (#236018)
@DPATCH@
diff -urNad trunk~/Gnu.pm trunk/Gnu.pm
--- trunk~/Gnu.pm 2006-01-15 19:34:52.835305578 +0200
+++ trunk/Gnu.pm 2006-01-15 19:34:57.369527534 +0200
@@ -278,6 +278,10 @@
my $self = shift;
my ($prompt, $preput) = @_;
+ # make sure the outstream fd inside the readline library is
+ # in sync (see http://bugs.debian.org/236018)
+ $Attribs{outstream} = $Attribs{outstream};
+
# ornament support (now prompt only)
$prompt = ${$Attribs{term_set}}[0] . $prompt . ${$Attribs{term_set}}[1];
--- libterm-readline-gnu-perl-1.16.orig/Gnu.xs
+++ libterm-readline-gnu-perl-1.16/Gnu.xs
@@ -2674,6 +2674,9 @@
if (outstreamPIO != NULL)
PerlIO_releaseFILE(outstreamPIO, rl_outstream);
rl_outstream = PerlIO_findFILE(stream);
+ if (!rl_outstream)
+ rl_outstream = stdout;
+
RETVAL = outstreamPIO = stream;
#ifdef __CYGWIN__
{
More information about the pkg-perl-maintainers
mailing list