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 03:52
Subject:
Re: Possible bug: Perl 5.10.0 does not set $? & 128 when dumpingcore
Message ID:
20081216115208.GA17684@almanda
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

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



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