Hi, I'm using Cygwin for executing build scripts. Thereby I encounter the following error sporadically:
44 [main] bash 21136! _pinfo::dup_proc_pipe: DuplicateHandle failed, pid 21136, hProcess 0x158, wr_proc_pipe 0xF8, Win32 error 5 The mailing list archives also know about the problem (but I didn't found a solution), see _pinfo::dup_proc_pipe: DuplicateHandle failed <http://lists-archives.org/cygwin/35191-_pinfo-dup_proc_pipe-duplicatehandle-failed.html> [1.7.0-49] DuplicateHandle failed <http://lists-archives.org/cygwin/45068-duplicatehandle-failed.html> I can reproduce the problem using the following shell script: test.sh: 01 #!/bin/bash 02 03 PATH="${PATH}:$(cygpath -u "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin")" 04 CC="cl" 05 CFLAGS="-nologo -EP" 06 TEMPLATE="test.tc" 07 RUNS=3000 08 09 i=0 10 while [ $i -lt ${RUNS} ]; do 11 ( 12 ${CC} ${CFLAGS} ${TEMPLATE} > test${i}.c 13 rm -f test${i}.tc 14 ) & 15 (( i++ )) 16 done 17 wait The template contains only the following include statement to keep the compiler somewhat busy: test.tc: 01 #include <stdio.h> The sample uses the Microsoft C/C++ compiler but I guess it should work with other compilers too - just adapt binary and flags (e.g. the GNU C/C++ comiler takes '-E' for the flags). Please keep me on the CC list as I'm not subscribed to the mailing list. Regards, Stefan Kaltenberger BTW: I'm currently using Cygwin version 1.5 on Windows Server 2008 R2 x64: $ cygcheck -s Cygwin Configuration Diagnostics Current System Time: Wed Feb 16 11:34:57 2011 Windows Longhorn/Vista (not yet supported!) Ver 6.1 Build 7600 Running under WOW64 on AMD64 Running in Terminal Service session Path: c:\home\bin [...] CYGWIN = 'nontsec' [...] Cygwin DLL version info: DLL version: 1.5.25 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 156 Shared data: 4 DLL identifier: cygwin1 [...] Cygwin Package Information Package Version _update-info-dir 00811-1 alternatives 1.3.30c-2 ash 20040127-4 base-files 3.7-1 base-passwd 2.2-1 bash 3.2.48-21 bzip2 1.0.5-3 coreutils 6.10-2 crypt 1.1-1 csih 0.1.8-1 cygrunsrv 1.34-1 cygutils 1.3.2-1 cygwin 1.5.25-15 cygwin-doc 1.4-4 diffutils 2.8.7-1 editrights 1.01-2 findutils 4.4.0-3 gawk 3.1.6-1 grep 2.5.3-1 groff 1.19.2-2 gzip 1.3.12-2 less 382-1 libbz2_1 1.0.5-3 libiconv2 1.12-1 libintl2 0.12.1-3 libintl3 0.14.5-1 libintl8 0.17-3 libncurses8 5.5-4 libpcre0 7.8-1 libpopt0 1.6.4-4 libreadline6 5.2.13-11 libwrap0 7.6-4 login 1.9-8 man 1.6e-1 minires 1.02-1 openssh 5.1p1-10 openssl 0.9.8j-1 patch 2.5.8-9 rebase 2.4.4-1 run 1.1.10-1 sed 4.1.5-2 tar 1.21-1 termcap 20050421-1 terminfo 5.7_20090228-1 terminfo0 5.5_20061104-2 texinfo 4.8a-1 tzcode 2008h-1 unzip 5.52-3 which 2.20-1 zip 3.0-2 zlib 1.2.3-3 zlib-devel 1.2.3-3 zlib0 1.2.3-3 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple