From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5935 invoked by alias); 11 Jul 2012 00:50:22 -0000 Received: (qmail 5924 invoked by uid 22791); 11 Jul 2012 00:50:20 -0000 X-SWARE-Spam-Status: No, hits=2.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_THEBAT,KHOP_DNSBL_BUMP,KHOP_THREADED,RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_L3,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mr0.ht-systems.ru (HELO mr0.ht-systems.ru) (78.110.50.55) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Jul 2012 00:50:07 +0000 Received: from [91.76.210.46] (helo=darkdragon.lan) by mr0.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1Sol7y-0000E6-M1; Wed, 11 Jul 2012 04:50:02 +0400 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Wed, 11 Jul 2012 00:41:56 -0000 Date: Wed, 11 Jul 2012 00:50:00 -0000 From: Andrey Repin Reply-To: Andrey Repin Message-ID: <398013297.20120711044156@mtu-net.ru> To: Aaron Schneider , cygwin@cygwin.com Subject: Re: Inconsistence on file operation when the name already exists with exe extension In-Reply-To: References: <20120709154456.GA6696@ednor.casa.cgf.cx> <1BBEF94B6B46E54980290D150A6F2EDD20C950F5@SN2PRD0610MB396.namprd06.prod.outlook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-07/txt/msg00150.txt.bz2 Greetings, Aaron Schneider! >>> Probably compiling binaries under cygwin without the exe extension, like >>> unix, is not an alternative, or is it? Cygwin may detect if it is >>> executable checking if it's PE format; if it is perl script. Just check >>> if file is present in path or run. /file >> >> False. It is wholly possible, you just have to pass the correct flags >> to the linker process. Current windows versions since at least XP and >> maybe before would run files that did not contain a .exe extension. >> > I don't see how you can run a PE executable from windows shell (cmd.exe) You're comparing apples to oranges. You've been told already that Cygwin doesn't try to emulate windows shells or anything of that kind. > directly without the exe extension. I've just tried it in several ways > and always prompts me the "Open with..." dialog instead of directly > running it because treats it as data. > When you say that Windows XP and above can run an executable without > extension, you are talking about running it from windows shell. No, he's talking about CreateProcess[Ex]() function call. It's possible to execute binary with arbitrary name, since at least Win NT 4.x if memory serves me well. > But I was referring in the end to the cygwin terminal > (C:\cygwin\bin\mintty.exe -) that I believe can run exe without > extension even in older versions of windows, because it's bash that > launches it as you said before. You're confusing shell with terminal... don't you? Try mintty.exe -h -e C:\WINDOWS\system32\cmd.exe /K You'll be surprised. > That's being said because I expect users to run commands from the cygwin > terminal. The exe extension is needed if you want to run the linux > commands directly from the windows shell directly (c:\cygwin\bin\ and > other bash PATHs should be exported to the windows PATH to run them > directly from windows shell, but you will mix things up) I do like to mix things. Alot. Life is just not the same without that. -- WBR, Andrey Repin (anrdaemon@freemail.ru) 11.07.2012, <04:32> Sorry for my terrible english... -- 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