X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id :references:to; q=dns; s=default; b=bxqXMAWGa9V0zSVvlLyKLMXUKov0 AGa+vzlL6qP6y/yc6ciDRz3llqp3gQ3KTJ21ECJ5Pyg9MRZdhNRAjTth1iW3kj15 NCjmmIZRRO0OhDuTAavC9aMR0DkZ94XJ4Qsh3SShoFvb9EdK+w50p9ftVxYqKpip J7mHY8oLEFElKEU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id :references:to; s=default; bh=9j6+9WujFUn4tsLFK+JrhBxuu1M=; b=J/ yUZitC8HO+XHU2buMHJ1K1oH1zNpwmdJukK2KrungDUhlxvnMAqhqGGgMHrvIyUJ IbpOr4rcTGnS/YNvA3b1Ntzz2UnKjKEThTD7TxC4hoj6E/eJRyK7Tvuibq2XADdk /SDsK5IH5thata6JUjzwskMOO0oPK845J3z9P56A4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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 08:52:29 -0600 Message-Id: <595078DB-0AC5-4C07-8723-8977102EA2E1@etr-usa.com> 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> To: cygwin AT cygwin DOT com X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s9OEqjjP005345 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. >> >> 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