public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: John Wiersba <jrw32982@yahoo.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: Why can't run.exe execute a shebang script directly?
Date: Fri, 24 Oct 2014 15:22:00 -0000	[thread overview]
Message-ID: <1414163944.58941.YahooMailNeo@web162803.mail.bf1.yahoo.com> (raw)
In-Reply-To: <20141024135339.GM20607@calimero.vinschen.de>

> 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

  parent reply	other threads:[~2014-10-24 15:22 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
2014-10-24 15:22   ` John Wiersba [this message]
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=1414163944.58941.YahooMailNeo@web162803.mail.bf1.yahoo.com \
    --to=jrw32982@yahoo.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).