From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27209 invoked by alias); 24 Oct 2014 14:52:34 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 27198 invoked by uid 89); 24 Oct 2014 14:52:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: etr-usa.com Received: from etr-usa.com (HELO etr-usa.com) (130.94.180.135) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Oct 2014 14:52:32 +0000 Received: (qmail 18620 invoked by uid 13447); 24 Oct 2014 14:52:31 -0000 Received: from unknown (HELO polypore.west.etr-usa.com) ([68.35.121.157]) (envelope-sender ) by 130.94.180.135 (qmail-ldap-1.03) with AES128-SHA encrypted SMTP for ; 24 Oct 2014 14:52:31 -0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Why can't run.exe execute a shebang script directly? From: Warren Young In-Reply-To: <544A5AC3.7060208@redhat.com> Date: Fri, 24 Oct 2014 14:52:00 -0000 Content-Transfer-Encoding: quoted-printable Message-Id: <595078DB-0AC5-4C07-8723-8977102EA2E1@etr-usa.com> References: <1414155946.62587.YahooMailNeo@web162803.mail.bf1.yahoo.com> <20141024135339.GM20607@calimero.vinschen.de> <544A5AC3.7060208@redhat.com> To: cygwin@cygwin.com X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00400.txt.bz2 On Oct 24, 2014, at 7:57 AM, Eric Blake 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. >>=20 >> 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. >=20 > 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=85 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=92t like the idea of reinventing execve(2) inside r= un.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