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:references:message-id:date:from:reply-to
	:subject:to:in-reply-to:mime-version:content-type; q=dns; s=
	default; b=uKEwYjsz2feC7K4+eX/TlGTMdG/ImOYEBEXmlCelkhZhvyMWMb4UC
	+AW+sGUQ+F259usQY8bt9Wbvzfz9IaGKbYs976pdndaUxbIkCfsvudRMxfTCnlYY
	IzT+GVHd5s3b5dFgZGawoxJSABzKDMR0TYtFbX/umS8VhP6EEPK8JA=
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:references:message-id:date:from:reply-to
	:subject:to:in-reply-to:mime-version:content-type; s=default;
	 bh=ZUXd9auJ2abb/qwrHQX0MuQHJGU=; b=ZLHG9vcoJJgLnvu3X/kbJsEQhcNh
	Nuu2/4Xknmr3U3N1dgX6yEritUZ60Z2x34x4KZZ6n1XXXMiewL3LDc4X147ueAjJ
	T+Qge1cM3g2GYCYECJ/3kjVWsTouMYOW4PCP7PGlgVD4lbjabIQycw8msoWVSbU9
	q5VYLhe/MOKxDg0=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2
X-HELO: nm34-vm1.bullet.mail.ne1.yahoo.com
References: <1414155946.62587.YahooMailNeo@web162803.mail.bf1.yahoo.com> <20141024135339.GM20607@calimero.vinschen.de>
Message-ID: <1414163944.58941.YahooMailNeo@web162803.mail.bf1.yahoo.com>
Date: Fri, 24 Oct 2014 08:19:04 -0700
From: John Wiersba <jrw32982@yahoo.com>
Reply-To: John Wiersba <jrw32982@yahoo.com>
Subject: Re: Why can't run.exe execute a shebang script directly?
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
In-Reply-To: <20141024135339.GM20607@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-IsSubscribed: yes

> From: Corinna Vinschen <corinna-cygwin@cygwin.com>

>
> On Oct 24 06:05, John Wiersba wrote:
> 
>>  I would have thought cygwin1.dll contains the code necessary to do this, 
> like the linux kernel does.  Can it be added to the dll or does it have to be 
> added to each executable individually, such as bash.exe, run.exe, etc.?
>> 
>>    bash$ /bin/run ./try
>>    run FATAL: Could not start D:\ftp\try
> 
> run.exe doesn't start the executable via a Cygwin function, but via a
> Windows call.  There's no chance for the DLL to handle shebangs.

Thanks, Corinna!  This is the real reason.  

I thought that all (or virtually all) cygwin-supplied programs that start 
other programs use the cygwin1.dll execve(2) emulation to start them, because 
the execve emulation can be used to start *both* cygwin programs and windows 
native programs.  Or at least it seems that way to me.

Is there be in drawback to having run.exe start its target program using
the execve emulation in cygwin1.dll, rather than using a Windows call to
start the target executable?

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

