Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Subject: Re: Re: 1.5.16: DuplicateHandle(Out) failed (e=6)
Reply-To: nlm24@byu.edu
From: "Nathan L Mullen" <nlm24@email.byu.edu>
To: cygwin@cygwin.com
Date: Tue, 31 May 2005 14:55:43 -0600
X-Sender: nlm24
MIME-Version: 1.0
Message-ID: <1117572943.92304acnlm24@email.byu.edu>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j4VKtxdI016921

Thank you for your willingness to help.

>> I recently upgraded from Cygwin 1.5.6-1 to 1.5.16-1.  
>
>Does it still happen with 1.5.17-1?

Yes.

>> showProb.sh: ###########################################
>>     #!/bin/sh
>>     perl -S showProb.pl
>
>That's not a bash script.
>Is the -S necessary?  (= search for perl script on your path)

No, the -S is not necessary.  I removed the -S and recieved the same error.

>> I used cl to compile showProb.c: "cl showProb.c -o showProb.exe".
>
>Does it fail for you compiled with:
>
> gcc -o showProb.exe -mno-cygwin showProb.c
>
>It doesn't for me, on cygwin 1.5.17-1.

DuplicateHandle works for me as well if compiled with gcc.  Only when it is compiled with "cl" (Microsoft's C compiler) do I have this problem.  As Gerrit Haase mentioned, the problem is possibly a quirk with cl.

Again, I only have the DuplicateHandle if the showProb.pl script is called from showProb.sh.  Otherwise, DuplicateHandle works when compiled with cl.

Thanks again for your assistance.  I appreciate it.

Nathan




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


