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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; q=dns; s=default; b=mFAEV+ iOgwU2KqdqS4lFlftAVSY4cC0u1AVYAlk1WDID3d/BwJxe1BHLVo0yhPSai1Mnzz U9WMLUcskoSVW5it+M/radl0st+i6jlPDJnTyYLly11hn+TrOt0lRFaP9pQR2xqi WtamxioQrBPkBVKQMGfGjVknW9e/H7Ik2yaFU= 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; s=default; bh=8vvS/vHHSf2A 78d02wAsw6O44xM=; b=uOwAXaFFNlHaTUTygrzyFHwDLBZ2PCer/W5FehM3bAcI GbdjeZSrOJ415u3ILwS3dNDYe4NWjKVmevQ0rgSBJgqVoNqONaUTjd9oDE+uW73/ AwNMRTJrYNfCvyPkPJ8BnN25XeKYrK4+ozTK4pEykNw9FFHabO4gwVfDJe2z2yo= 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.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 Message-ID: <544A5AC3.7060208@redhat.com> Date: Fri, 24 Oct 2014 07:57:23 -0600 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 AT cygwin DOT com Subject: Re: Why can't run.exe execute a shebang script directly? 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> 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 --obJBLOkSmqvwSGeXMbgTPn2FdCcktGjr8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" -----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--