This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Why can't run.exe execute a shebang script directly?
- From: Warren Young <warren at etr-usa dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 24 Oct 2014 08:52:29 -0600
- 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> <544A5AC3 dot 7060208 at redhat dot com>
On Oct 24, 2014, at 7:57 AM, Eric Blake <eblake@redhat.com> wrote:
> On 10/24/2014 07:53 AM, Corinna Vinschen wrote:
>> 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.
>>
>> 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.
>
> Of course, if you wanted to be nice, you could write a patch to run.exe
> that teaches it to read() the contents of a file that it is about to
> execute, and if it starts with a shebang…
I get that run.exe must do low-level Win32 API things in order to suppress the console window, which is why it is currently a native app, rather than a Cygwin app, but I don’t like the idea of reinventing execve(2) inside run.exe.
--
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