develooper Front page | perl.perl5.porters | Postings from March 2003

[perl #21717] system() call "swallows" STDIN in ActiveState Perl 5.8

From:
Garry "Spiderman" Taylor
Date:
March 27, 2003 09:37
Subject:
[perl #21717] system() call "swallows" STDIN in ActiveState Perl 5.8
Message ID:
rt-21717-54161.2.31528638842931@bugs6.perl.org
# New Ticket Created by  "Garry \"Spiderman\" Taylor" 
# Please include the string:  [perl #21717]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=21717 >


This is a bug report for perl from spidey@adelphia.net,
generated with the help of perlbug 1.34 running under perl v5.8.0.


-----------------------------------------------------------------
[Please enter your report here]

I noticed this while attempting to run a script written for Perl 5.6.  The
difference can be seen by running the following from the command line on a
Windows system:

dir | perl -e "while(<STDIN>){ print $_; system('cmd /c echo');}"

On machines with a 5.6 distribution installed, the entire directory
displays,
with an intervening "ECHO is on." line between each file.  Using
ActiveState's
Perl 5.8, I get only the first line, and a few of the remaining lines.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl v5.8.0:

Configured by ActiveState at Tue Feb  4 18:07:44 2003.

Summary of my perl5 (revision 5 version 8 subversion 0) configuration:
  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    usethreads=undef use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags
='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE
_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL
_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags
'-nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"c:\Perl\lib\CORE"  -ma
chine:x86'
    libpth="c:\Micros~1\vc98\LIB" "c:\Micros~1\vc98\MFC\LIB"
"C:\DB2_5.0\LIB" "c:\sybase11.9.2\LIB" "C:\SmartHeap" "c:\Perl\lib\CORE"
    libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
    perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
    gnulibc_version='undef'
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ',
lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"c:\Perl
\lib\CORE"  -machine:x86'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY

---
@INC for perl v5.8.0:
    c:/Perl/lib
    c:/Perl/site/lib
    .

---
Environment for perl v5.8.0:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=c:\Perl\bin;C:\Microsoft Visual
Studio\Common\MSDev98\Bin;C:\Microsoft Visual Studio\VC98\BIN;C:\Microsoft
Visual Studio\Common\TOOLS;C:\Microsoft Visual
Studio\Common\TOOLS\WINNT;C:\MICROS~1\Common\msdev98\bin;C:\MICROS~1\VC98\bi
n;C:\MICROS~1\Common\tools\WINNT;C:\MICROS~1\Common\tools;C:\Perl\bin;D:\WIN
NT\system32;D:\WINNT;D:\WINNT\system32\WBEM;e:\bin;f:\vim;c:\unix95;c:\ifor\
WIN\BIN;c:\ifor\WIN\BIN\EN_US;c:\IMNNQ_NT;C:\DB2_5.0\BIN;C:\DB2_5.0\FUNCTION
;C:\DB2_5.0\SAMPLES\REPL;C:\DB2_5.0\HELP;E:\ORANT\BIN;c:\sybase11.9.2\DLL;c:
\sybase11.9.2\BIN;c:\Program Files\Sybase\Sybase
Central\win32;c:\sybase11.9.2\ASEP;c:\MSSQL7\BINN;c:\gs\gs8.00\bin;d:\Docume
nts and
Settings\GTAYLOR;C:\PROGRA~1\NETWOR~1\MCAFEE~1;e:\winnt4;e:\winnt4\system32;
C:\oracle8\bin;f:\orawin73\bin;g:\orawin71\bin;c:\local\bin;e:\mssql6.5\binn
;g:\ms_sql\bin;g:\dos;c:\bin;c:\docucorp\comobjs;f:\sasc701\host\wnt\bin;g:\
sybtools;i:\sqlany50\win32
    PERL=c:\perl\bin
    PERL5OPT=-MWild
    PERLDOC_PAGER=less
    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