From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32742 invoked by alias); 24 Oct 2014 15:22:11 -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 32659 invoked by uid 89); 24 Oct 2014 15:22:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: nm34-vm1.bullet.mail.ne1.yahoo.com Received: from nm34-vm1.bullet.mail.ne1.yahoo.com (HELO nm34-vm1.bullet.mail.ne1.yahoo.com) (98.138.229.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 24 Oct 2014 15:22:09 +0000 Received: from [127.0.0.1] by nm34.bullet.mail.ne1.yahoo.com with NNFMP; 24 Oct 2014 15:22:07 -0000 Received: from [98.138.100.113] by nm34.bullet.mail.ne1.yahoo.com with NNFMP; 24 Oct 2014 15:19:05 -0000 Received: from [66.196.81.174] by tm104.bullet.mail.ne1.yahoo.com with NNFMP; 24 Oct 2014 15:19:05 -0000 Received: from [98.139.212.219] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 24 Oct 2014 15:19:04 -0000 Received: from [127.0.0.1] by omp1028.mail.bf1.yahoo.com with NNFMP; 24 Oct 2014 15:19:04 -0000 Received: (qmail 33109 invoked by uid 60001); 24 Oct 2014 15:19:04 -0000 Received: from [198.91.4.14] by web162803.mail.bf1.yahoo.com via HTTP; Fri, 24 Oct 2014 08:19:04 PDT References: <1414155946.62587.YahooMailNeo@web162803.mail.bf1.yahoo.com> <20141024135339.GM20607@calimero.vinschen.de> Message-ID: <1414163944.58941.YahooMailNeo@web162803.mail.bf1.yahoo.com> Date: Fri, 24 Oct 2014 15:22:00 -0000 From: John Wiersba Reply-To: John Wiersba Subject: Re: Why can't run.exe execute a shebang script directly? To: "cygwin@cygwin.com" In-Reply-To: <20141024135339.GM20607@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00403.txt.bz2 > From: Corinna Vinschen > > 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