delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/10/24/11:22:49

X-Recipient: archive-cygwin AT delorie DOT 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 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
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 DOT 62587 DOT YahooMailNeo AT web162803 DOT mail DOT bf1 DOT yahoo DOT com> <20141024135339 DOT GM20607 AT calimero DOT vinschen DOT de>
Message-ID: <1414163944.58941.YahooMailNeo@web162803.mail.bf1.yahoo.com>
Date: Fri, 24 Oct 2014 08:19:04 -0700
From: John Wiersba <jrw32982 AT yahoo DOT com>
Reply-To: John Wiersba <jrw32982 AT yahoo DOT com>
Subject: Re: Why can't run.exe execute a shebang script directly?
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
In-Reply-To: <20141024135339.GM20607@calimero.vinschen.de>
MIME-Version: 1.0
X-IsSubscribed: yes

> From: Corinna Vinschen <corinna-cygwin AT cygwin DOT 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

- Raw text -


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