Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal warnings, local $?, qx() odd interaction #13084

Open
p5pRT opened this issue Jul 5, 2013 · 3 comments
Open

fatal warnings, local $?, qx() odd interaction #13084

p5pRT opened this issue Jul 5, 2013 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 5, 2013

Migrated from rt.perl.org#118767 (status was 'open')

Searchable as RT118767$

@p5pRT
Copy link
Author

p5pRT commented Jul 5, 2013

From thepler@genome.wustl.edu

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.


gist​:
http​://gist.github.com/thepler/5920936

here it is inline​:
# 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.



Flags​:
  category=library
  severity=low
  module=warnings


Site configuration information for perl 5.18.0​:

Configured by thepler at Tue May 21 13​:31​:32 CDT 2013.

Summary of my perl5 (revision 5 version 18 subversion 0) configuration​:

  Platform​:
  osname=darwin, osvers=12.3.0, archname=darwin-2level
  uname='darwin dhcp-10-0-108-54.gsc.wustl.edu 12.3.0 darwin kernel version 12.3.0​: sun jan 6 22​:37​:10 pst 2013; root​:xnu-2050.22.13~1release_x86_64 x86_64 '
  config_args='-de -Dprefix=/Users/thepler/perl5/perlbrew/perls/perl-5.18.0 -Aeval​:scriptdir=/Users/thepler/perl5/perlbrew/perls/perl-5.18.0/bin'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
  optimize='-O3',
  cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.27)', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib
  libs=-ldbm -ldl -lm -lutil -lc
  perllibs=-ldl -lm -lutil -lc
  libc=, so=dylib, useshrplib=false, libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector'

Locally applied patches​:


@​INC for perl 5.18.0​:

/Users/thepler/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/darwin-2level
  /Users/thepler/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0

/Users/thepler/perl5/perlbrew/perls/perl-5.18.0/lib/5.18.0/darwin-2level
  /Users/thepler/perl5/perlbrew/perls/perl-5.18.0/lib/5.18.0
  .


Environment for perl 5.18.0​:
  DYLD_LIBRARY_PATH (unset)
  HOME=/Users/thepler
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)

PATH=/Users/thepler/perl5/perlbrew/bin​:/Users/thepler/perl5/perlbrew/perls/perl-5.18.0/bin​:/usr/bin​:/bin​:/usr/sbin​:/sbin​:/usr/local/bin​:/opt/X11/bin​:/sbin​:/gsc/scripts/sbin​:/gsc/sbin​:/gscuser/thepler/bin​:/home/archive/local/bin​:/Applications/Xcode.app/Contents/Developer/usr/bin​:/Users/thepler/bin
  PERLBREW_BASHRC_VERSION=0.64
  PERLBREW_HOME=/Users/thepler/.perlbrew
  PERLBREW_MANPATH=/Users/thepler/perl5/perlbrew/perls/perl-5.18.0/man

PERLBREW_PATH=/Users/thepler/perl5/perlbrew/bin​:/Users/thepler/perl5/perlbrew/perls/perl-5.18.0/bin
  PERLBREW_PERL=perl-5.18.0
  PERLBREW_ROOT=/Users/thepler/perl5/perlbrew
  PERLBREW_VERSION=0.64
  PERL_BADLANG (unset)
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2013

From @jkeenan

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.

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2013

The RT System itself - Status changed from 'new' to 'open'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants