develooper Front page | perl.perl5.porters | Postings from August 2018

[perl #133463] perl -e "open A, 'dir|';print $?" should be 0 onMSWin32

From:
Konovalov, Vadim
Date:
August 24, 2018 14:49
Subject:
[perl #133463] perl -e "open A, 'dir|';print $?" should be 0 onMSWin32
Message ID:
rt-4.0.24-10385-1534881980-1546.133463-75-0@perl.org
# New Ticket Created by  Konovalov, Vadim 
# Please include the string:  [perl #133463]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=133463 >



This is a bug report for perl from vadim.konovalov@dell.com<mailto:vadim.konovalov@dell.com>,
generated with the help of perlbug 1.41 running under perl 5.27.9.


-----------------------------------------------------------------
[Please describe your issue here]

For this simple one-liner
  perl -e "open A, 'dir|';print $?"
different perl versions on Win32 mostly output -1
but not all (5.8.4 outputs 0)

D:\apps\perl-old\perl584\bin>perl -e "open A, 'dir|';print $?"
0
D:\apps\perl-old\perl5121\bin>perl -e "open A, 'dir|';print $?"
-1
D:\apps\perl-old\perl-5.16.0>perl -e "open A, 'dir|';print $?"
-1
D:\apps\perl-old\perl-5-004-02>perl -e "open A, 'dir|';print $?"
-1
D:\apps\perl-old\perl5_005_03>perl -e "open A, 'dir|';print $?"
-1
D:\apps\perl-old\perl561>perl -e "open A, 'dir|';print $?"
-1
D:\apps\perl-5.28.0\perl\bin>perl -e "open A, 'dir|';print $?"
-1

on Cygwin this outputs 0 as expected, as well as on linux freebsd etc

reading "perldoc perlvar" gives me think that it should output 0

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl 5.27.9:

Configured by konovv at Tue Feb 27 18:23:50 2018.

Summary of my perl5 (revision 5 version 27 subversion 9) configuration:

  Platform:
    osname=MSWin32
    osvers=10.0.14393
    archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended
    useposix=true
    d_sigaction=undef
    useithreads=define
    usemultiplicity=define
    use64bitint=undef
    use64bitall=undef
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='gcc'
    ccflags =' -s -O2 -DWIN32  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields'
    optimize='-s -O2'
    cppflags='-DWIN32'
    ccversion=''
    gccversion='7.1.0'
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=4
    doublesize=8
    byteorder=1234
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=12
    longdblkind=3
    ivtype='long'
    ivsize=4
    nvtype='double'
    nvsize=8
    Off_t='long long'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags ='-s -L"c:\perl\lib\CORE" -L"C:\MinGW\lib"'
    libpth=C:\MinGW\lib
    libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=
    so=dll
    useshrplib=true
    libperl=libperl527.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-mdll -s -L"c:\perl\lib\CORE" -L"C:\MinGW\lib"'


---
@INC for perl 5.27.9:
    C:\Work\PerlScripts\utl
    C:\Work\PerlScripts\mfdev
    C:\Personal\perlutl
    C:/vad/perl-dev/perl-compile/perl-5.27.9/lib

---
Environment for perl 5.27.9:
    HOME=c:\apps
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Program Files\Haskell\bin;C:\apps\Haskell-p-8.2.2\lib\extralibs\bin;C:\apps\Haskell-p-8.2.2\bin;C:\apps\vim80.1157;C:\apps\perl-5.26.0-32\c\bin;C:\apps\perl-5.26.0-32\perl\site\bin;C:\apps\perl-5.26.0-32\perl\bin;C:\apps\tcl-866-as86\bin;C:\apps\Python27;C:\apps\clisp-2.49;C:\Work\apps\report;C:\Work\apps;C:\apps\pandoc;C:\apps\emacs\bin;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\EMC\;c:\sh;C:\Program Files\Dell\Dell Data Protection\Encryption\;C:\apps\ggobi;C:\apps\Haskell-p-8.2.2\mingw\bin;C:\Users\konovv\AppData\Roaming\cabal\bin;C:\apps\haskell-p-8.2.2\Roaming\local\bin;C:\Users\konovv\.cargo\bin;C:\Users\konovv\AppData\Local\Microsoft\WindowsApps;C:\rakudo\bin;C:\rakudo\share\perl6\site\bin
    PERL5LIB=C:\Work\PerlScripts\utl;C:\Work\PerlScripts\mfdev;C:\Personal\perlutl
    PERL_BADLANG (unset)
    SHELL (unset)




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