From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6828 invoked by alias); 24 Oct 2014 13:57:27 -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 6813 invoked by uid 89); 24 Oct 2014 13:57:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 24 Oct 2014 13:57:25 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9ODvOYK016631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 24 Oct 2014 09:57:24 -0400 Received: from [10.3.113.23] (ovpn-113-23.phx2.redhat.com [10.3.113.23]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9ODvNeR023877 for ; Fri, 24 Oct 2014 09:57:23 -0400 Message-ID: <544A5AC3.7060208@redhat.com> Date: Fri, 24 Oct 2014 13:57:00 -0000 From: Eric Blake User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Why can't run.exe execute a shebang script directly? References: <1414155946.62587.YahooMailNeo@web162803.mail.bf1.yahoo.com> <20141024135339.GM20607@calimero.vinschen.de> In-Reply-To: <20141024135339.GM20607@calimero.vinschen.de> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="obJBLOkSmqvwSGeXMbgTPn2FdCcktGjr8" X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00399.txt.bz2 --obJBLOkSmqvwSGeXMbgTPn2FdCcktGjr8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1019 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. 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 >=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. 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, run the interpreter directly instead of handing things off to the Windows call (and maybe make this mode optional, requiring a command line option to turn on?). This is open source, after all. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --obJBLOkSmqvwSGeXMbgTPn2FdCcktGjr8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 539 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUSlrDAAoJEKeha0olJ0NqeXcIAK1o/YKFL+4hmz3hwqvyg8Go FNxivMPkrAf41mm9ka8hPK02XB7yToC3vxJNlFgI9WHygZj34dN8PFkYnxvqO+wx HhM3cZwVITyArIr2Rkr6WDr94PRP356pfzwjr42uNCvoC3R0V8XxHPtU2x9TCVVV PGakDevsmPpjwK3aeisoDsof3MKaLuBtEI9iVAdfUzJZfcPIzGGg79c3Ves1z9VA yPXz2Pbop4LVCnIKg9bCAY5u5K1TPZ9fEQnEDX7PKFu4/+kwdKvGnEwD9CrgY4ND 14goilbvGMtrWQofqCtzVEdffKeGIPOfg7NmxyphRpvd/fZKIQrqA1gCVAwBQ1s= =eEiX -----END PGP SIGNATURE----- --obJBLOkSmqvwSGeXMbgTPn2FdCcktGjr8--