delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/02/16/06:31:02

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,TW_YG,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
From: "Kaltenberger, Stefan" <Stefan DOT Kaltenberger AT fabasoft DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: _pinfo::dup_proc_pipe: DuplicateHandle failed
Date: Wed, 16 Feb 2011 11:30:45 +0000
Message-ID: <93D5B68CC8BD59469A3159484F69778178F72434@fabamailserver.fabagl.fabasoft.com>
MIME-Version: 1.0
X-purgate-ID: 152191::1297856094-00000828-899C9CE0/0-0/0-0
X-purgate-type: clean
X-purgate-size: 3799
X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de
X-purgate: This mail is considered clean (visit http://www.eleven.de for further information)
X-purgate: clean
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hi,

I'm using Cygwin for executing build scripts. Thereby I encounter the follo=
wing error sporadically:

44 [main] bash 21136! _pinfo::dup_proc_pipe: DuplicateHandle failed, pid 21=
136, 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-duplicatehandl=
e-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=09
03	PATH=3D"${PATH}:$(cygpath -u "C:/Program Files (x86)/Microsoft Visual St=
udio 10.0/VC/bin")"
04	CC=3D"cl"
05	CFLAGS=3D"-nologo -EP"
06	TEMPLATE=3D"test.tc"
07	RUNS=3D3000
08=09
09	i=3D0
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 comp=
iler somewhat busy:

test.tc:
01	#include <stdio.h>

The sample uses the Microsoft C/C++ compiler but I guess it should work wit=
h other compilers too - just adapt binary and flags (e.g. the GNU C/C++ com=
iler 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 =3D '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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019