develooper Front page | perl.perl5.porters | Postings from July 2013

[perl #118767] fatal warnings, local $?, qx() odd interaction

From:
James E Keenan via RT
Date:
July 12, 2013 01:14
Subject:
[perl #118767] fatal warnings, local $?, qx() odd interaction
Message ID:
rt-3.6.HEAD-2552-1373591613-1455.118767-15-0@perl.org
On Fri Jul 05 09:16:43 2013, thepler@genome.wustl.edu wrote:
> 
> 
> This is a bug report for perl from thepler@genome.wustl.edu,
> generated with the help of perlbug 1.39 running under perl 5.18.0.
> 

> # is this difference in $? expected or a bug?
> 
> $ perl -e 'use warnings; local $?; qx(command_not_in_path_arglebargle
>    2>&1); print "$?\n";'
> -1
> $ perl -e 'use warnings FATAL => "all"; local $?;
>    qx(command_not_in_path_arglebargle 2>&1); print "$?\n";'
> 0
> $ perl -e 'use warnings; qx(command_not_in_path_arglebargle 2>&1);
>    print "$?\n";'
> -1
> $ perl -e 'use warnings FATAL => "all";
>    qx(command_not_in_path_arglebargle 2>&1); print "$?\n";'
> 512
> 
> I tripped on the zero case (the second invocation) above.  I expected
>    $? to be non-zero after the qx().
> 
> I get consistent results for the above on 5.8.7, 5.10.1, and 5.18.0.
>    Those are the only versions I tried.
> 

I got similar results for perl 5.18.0 on Darwin/PPC and on Linux/i386.

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=118767



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