Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 523 forks source link

close(STDOUT) does not wait on MS-Windows #4106

Open p5pRT opened 22 years ago

p5pRT commented 22 years ago

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

Searchable as RT7142$

p5pRT commented 22 years ago

From @gisle

The following program fails to work on Windows. The program terminates before the child finish. If another file handle than STDOUT is used\, then it works as expected. It also works as expected on Linux.

open(STDOUT, qq(| perl -pe "sleep 1;")) || die;
print STDOUT "Hi\n" for 1..2;
close(STDOUT);
Perl Info ``` Flags: category=core severity=medium Site configuration information for perl v5.6.1: Configured by gislea at Tue Jun 19 12:57:27 2001. Summary of my perl5 (revision 5 version 6 subversion 1) 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=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX', optimize='-O1 -MD -DNDEBUG', 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='off_t', lseeksize=4 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='', ldflags ='-nologo -nodefaultlib -release -libpath:"C:\Perl\lib\CORE" -machine:x86' libpth="C:\Program Files\Microsoft.NET\FrameworkSDK\Lib\" "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=perl56.lib Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -libpath:"C:\Perl\lib\CORE" -machine:x86' Locally applied patches: ACTIVEPERL_LOCAL_PATCHES_ENTRY @INC for perl v5.6.1: C:/Perl/lib C:/Perl/site/lib . Environment for perl v5.6.1: HOME (unset) LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=C:\PROGRA~1\MICROS~3\Common\msdev98\BIN;C:\PROGRA~1\MICROS~3\VC98\BIN;C:\PROGRA~1\MICROS~3\Common\TOOLS\WINNT;C:\PROGRA~1\MICROS~3\Common\TOOLS;C:\DevStudio\SharedIDE\BIN;C:\DevStudio\VC\BIN;C:\DevStudio\VC\BIN\WINNT;C:\Python21\;C:\t32;c:\bin;C:\Perl\bin\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\WINNT\Microsoft.NET\Framework\v1.0.2728;C:\Program Files\Microsoft.NET\FrameworkSDK\Bin;h:\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;\\rake\t32;G:\DevStudio\VC\DEVSTUDIO\VC\BIN;G:\DevStudio\VC\DEVSTUDIO\VC\BIN\WINNT PERLDB_OPTS=RemotePort=127.0.0.1:2000 PERL_BADLANG (unset) SHELL (unset) ```
p5pRT commented 7 years ago

From horst.reiterer@fabasoft.com

I can reproduce the issue with 5.10 and 5.22. The problem randomly breaks OpenSSL builds.

p5pRT commented 7 years ago

From [Unknown Contact. See original ticket]

I can reproduce the issue with 5.10 and 5.22. The problem randomly breaks OpenSSL builds.

richardleach commented 4 years ago

Still present in v5.30.0 on Win 10.

toddr commented 4 years ago

@gisle FYI your case was moved here.