delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/19/12:21:54

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Fri, 19 Oct 2001 12:17:04 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: simple execvp test
Message-ID: <20011019121704.B26429@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <3BCECA31 DOT 4FE7AAD2 AT syntrex DOT com> <20011018171144 DOT B19399 AT redhat DOT com> <3BCFF639 DOT B4F5CF47 AT syntrex DOT com> <3BCFFB48 DOT 1E2B85F7 AT syntrex DOT com>
Mime-Version: 1.0
In-Reply-To: <3BCFFB48.1E2B85F7@syntrex.com>
User-Agent: Mutt/1.3.21i

On Fri, Oct 19, 2001 at 12:07:04PM +0200, Pavel Tsekov wrote:
>Pavel Tsekov wrote:
>> 
>> I'm looking at the spawn_guts code to see if
>> there is something in this setup which may
>> broke execvp.
>> 
>
>Btw I found something which may broke spawn_guts,
>though I dont think this is the case with
>James - see below:
>
>This code is from spawn_guts - the interesting thing
>about it is that it doesn set the errno (__seterrno())
>if the DuplicateHandle doesnt succeed. All the other
>Win32 apis which a called though the spawn_guts set
>the errno if they fail.
>
>So if we have execvp which loops through the PATH while
>it finds the executable thus executing spawn_guts many
>times most of which it fails with ENOENT and if spawn_guts
>fail to duplicate handle the errno will still be set to
>ENOENT which is not correct, maybe :)
>
>  if (!DuplicateHandle (hMainProc, hMainProc, hMainProc,
>&ciresrv.parent, 0, 1,
>                        DUPLICATE_SAME_ACCESS))
>     {
>       system_printf ("couldn't create handle to myself for child, %E");
>       return -1;
>     }

Did you see this error message?  If not, why are you mentioning this
code?

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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