X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=UbCSEpWYFvXFbDBd5ipAKDHg52ZuQ0MMd8ZSBAS0Aik
	xKpu2GEH0bbOt4mhFqJx/G/KfunjlyCyhw40/HSxGO+wjUuWf+gR2JcUjcY1+IgO
	H7M1XITNEZM2hg2NJ99keaQbtpxcHhr0iEzOGlEGGBsTJgd2DM5fLjf3/wFgYYCo
	=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=iceongKujRfBn6+AkG/8jqAW9Dg=; b=Ly4Uo2tbQ3c9MgI2W
	hhYNVZUwdHcGkw+mwWkuYgTC0fyl11zREilfr5CRDrMjrQvtY1GRet0PiMMUdB+h
	frnNY4FfCu2ssdgw8S5PZp4DwoDcPO3DuZOGldc6qHIlg6FHdQ9F1d8rDGu8smsC
	SJN5SQ9Wo47rIu7qoPyV55bLUY=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.1
Message-ID: <51C1EAA3.6040307@etr-usa.com>
Date: Wed, 19 Jun 2013 11:30:11 -0600
From: Warren Young <warren@etr-usa.com>
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Adding MSYS functionality to Cygwin
References: <CABEPuQJDLjtbcLig1isTUJgb6RBCD8LNShbm9mTPcb9WM5S5fw@mail.gmail.com> <51C0B08E.8080900@etr-usa.com> <CABEPuQJJpRfPKSwZ7M0eTOdp1HxDcmvuy1=qXFHBw-8kLkZ1ZQ@mail.gmail.com> <51C0D956.4090905@etr-usa.com> <20130619020234.GA3669@ednor.casa.cgf.cx>
In-Reply-To: <20130619020234.GA3669@ednor.casa.cgf.cx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 6/18/2013 20:02, Christopher Faylor wrote:
> On Tue, Jun 18, 2013 at 04:04:06PM -0600, Warren Young wrote:
>> It would be possible, though somewhat evil, for Cygwin's exec()
>> implementation to peek at the DLL dependency list of a program before
>> starting it, and from that infer whether it should automatically
>> translate paths.
>
> Cygwin already does this.  It detects whether the program it is about
> to run uses the Cygwin DLL and, if not, makes decisions on how to
> handle exec.  It would be relatively easy to extend this.

Well, given that we're already paying the "peek" cost, I don't have any 
objection to making exec() take longer for the native Windows case only.

Do you know how you want to cope with my contrived "xcopy /bin a b" 
example?  The point of the example, of course, is that "/bin" looks like 
a real, existing POSIX path, but isn't.

 From Chuck's explanation of MSYS, looks like "/b /i /n" would also get 
caught in their heuristics, since it apparently doesn't do file 
existence checks.  (Else, Chuck's dumpbin example wouldn't need a 
workaround.)

File existence checks would fix that, but would then prevent this from 
doing what you want:

     $ notepad ~/tmp/newfile.txt

So, it looks like MSYS is right not to try file existence checks.

(Yes, I realize you can rewrite my xcopy example using dashes for the 
flags.  That's beside the broader point, which is that not all things 
that look like POSIX paths are such.)

--
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

