develooper Front page | perl.perl5.porters | Postings from December 2008

Re: Possible bug: Perl 5.10.0 does not set $? & 128 when dumpingcore

Thread Previous | Thread Next
From:
Abigail
Date:
December 16, 2008 05:07
Subject:
Re: Possible bug: Perl 5.10.0 does not set $? & 128 when dumpingcore
Message ID:
20081216130708.GB17684@almanda
On Tue, Dec 16, 2008 at 12:13:21PM +0000, Ben Morrow wrote:
> 
> Quoth abigail@abigail.be (Abigail):
> > On Tue, Dec 16, 2008 at 10:40:14AM +0000, Ben Morrow wrote:
> > > 
> > > Quoth pjf@perltraining.com.au (Paul Fenwick):
> > > > G'day everyone,
> > > > 
> > > > I've been working with the Debian Perl list, who have found an oddity with
> > > > how Perl works with $?
> > > > 
> > > > With thanks to Niko Tyni:
> > > > 
> > > > # perl -le 'system($^X, "-e", q/kill 6,$$; sleep 1/); print "version=$^V
> > > > \$?=$? native=${^CHILD_ERROR_NATIVE}"'
> > > > 
> > > > 
> > > > Signal 6 is a SIGABRT, which most systems interpret as a request to dump
> > > > core.  This gives us:
> > > > 
> > > > 	version=v5.10.0 $?=6 native=134
> > > > 
> > > > 	version=5.008008 $?=134 native=
> > > > 
> > > <snip>
> > > > 
> > > > 	a) If anyone else can produce the same results on a
> > > > 	   non-Debian system.
> > > 
> > > No. I get:
> > > 
> > >     archname=i386-freebsd version=v5.10.0 $?=134 native=134
> > 
> > I get yet another thing - both $? and ${^CHILD_ERROR_NATIVE} are set to 6.
> > 
> >    version=v5.10.0 $?=6 native=6
> 
> Do you have a ulimit -c set? That's what I get if the process didn't
> actually dump core.

No limits were set. 

No core file is left behind though, regardless of the version.

> > This is on Fedora 6 (and also on Fedora 4):
> > 
> >    $ uname -a
> >    Linux almanda 2.6.11-1.1369_FC4smp #1 SMP Thu Jun 2 23:08:39 EDT 2005
> > i686 i686 i386 GNU/Linux
> >    $ uname -a 
> >    Linux ayla 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 15:12:59 EST 2007 i686
> > i686 i386 GNU/Linux
> > 
> > But I don't get the version number on 5.8.9, and even less info in 5.8.8:
> > 
> >    $ cat x
> >    system($^X, "-e", q/kill 6,$$; sleep 1/);
> >    print "version=$^V \$?=$? native=${^CHILD_ERROR_NATIVE}\n"
> >    $ /opt/perl/5.8.9/bin/perl x
> >    version= $?=6 native=6
> >    $ 1;2c
> >    $ /opt/perl/5.8.8/bin/perl x
> >    versio $?=6 native=
> >    $ 1;2c
> 
> Yes, me too. I think $^V isn't directly printable under 5.8: it's still
> a v-string made of magic characters rather than a version object. You
> need to use printf "%v", or just use $] instead (I presume that's what
> Paul did in his original test).


Ah, yes. Using $] I get the version number. Still gives me 'native=6' for
5.8.9 and 'native=' for 5.8.8 though.


Abigail

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