This is the mail archive of the
mailing list for the Cygwin project.
Re: Why can't run.exe execute a shebang script directly?
- From: John Wiersba <jrw32982 at yahoo dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Fri, 24 Oct 2014 08:19:04 -0700
- Subject: Re: Why can't run.exe execute a shebang script directly?
- Authentication-results: sourceware.org; auth=none
- 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>
- Reply-to: John Wiersba <jrw32982 at yahoo dot com>
> From: Corinna Vinschen <email@example.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
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple