From: Warren Young <warren@etr-usa.com>
To: cygwin@cygwin.com
Subject: Re: Why can't run.exe execute a shebang script directly?
Date: Fri, 24 Oct 2014 14:52:00 -0000 [thread overview]
Message-ID: <595078DB-0AC5-4C07-8723-8977102EA2E1@etr-usa.com> (raw)
In-Reply-To: <544A5AC3.7060208@redhat.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
next prev parent reply other threads:[~2014-10-24 14:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 13:08 John Wiersba
2014-10-24 13:50 ` Andrey Repin
2014-10-24 14:57 ` Warren Young
2014-10-24 13:53 ` Corinna Vinschen
2014-10-24 13:57 ` Eric Blake
2014-10-24 14:52 ` Warren Young [this message]
2014-10-24 15:22 ` John Wiersba
2014-10-24 15:26 ` Eric Blake
2014-10-24 16:43 ` John Wiersba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=595078DB-0AC5-4C07-8723-8977102EA2E1@etr-usa.com \
--to=warren@etr-usa.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).