X-Recipient: archive-cygwin@delorie.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:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=VxgCGQ7dpKftmleq
	xw/t88Ti+oV+SrpzZApxAX3TEbExtlzjUMetX/btY0/s4HcEob7t3iyp5seMumGs
	BaTmwE5nz4bTztcnaABfS1NJy5WFVKzdKOKU2/sC8/K1P2jV1Cc/4LCnQ/mU3wfE
	UnMcZGVrmXrEWHSOfuXw7HJAddc=
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:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=TLrgxwGyBlFc65GwwzELA4
	FkJp4=; b=g5Dtz1SwY3DPLraC9TdBVGNNee8qJ37plWKDIu4K2bAhNyAX43MDQC
	7Lp2NcEVzwgrkzdm3c8a9NxrUQb5/vreaXjq5EcRZkxy5ggwnKUkL3Nnv2b0ytCI
	i14E19xLNQi0WVJAYo0xUJ8Hf9TggI858bTOwWlGOb4hr/NqfXdyA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*i:sk:AZe1Z2W, H*f:sk:AZe1Z2W
X-HELO: mail-io0-f174.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20130820;        h=x-gm-message-state:subject:to:references:from:message-id:date         :user-agent:mime-version:in-reply-to:content-transfer-encoding;        bh=DEaJ/5DmX/5rAYz/emq2OdlzYzHTNYGbG9i18mIgV2Q=;        b=XB93Au6+2TGKvY3FrGdrDdSQIESMY52m8iN4neyNU50jC8Xqcac4AosrD91OX4itzu         et/nzoF3p1FWkUCpjgnt0ilcDvVwMwivyxCS/90vi2kUX7gvesYgV+nRjdVSNbFE4cuW         aWrnsab5G5urnZciBz3TBaHQExzQN+p63JQW4Gclg2I9SWoSyCxyf8m6yXemtEKz31i0         nPQzdhmDVbU3+4eWk6MIYfTa3wxa29jsJ2FDVUtKpds1/G0Zpqm0M02CTncWNp+PBgNS         wrBbdjs7K3Sgsc5/WpiRBbUjbswIRfG+bO+kBVmgw282FosEtNb6QvOzSuumqxMbOvCu         yW2g==
X-Gm-Message-State: AEkoouslU4zCLOkbExotHicIYghaM0Xwzg1YrfLLVTdDXGaSi5lGPRYS0fl8ZP9u5zeiyA==
X-Received: by 10.107.5.148 with SMTP id 142mr1562650iof.18.1470755747605;        Tue, 09 Aug 2016 08:15:47 -0700 (PDT)
Subject: Re: PATHEXT is fundamental to Windows and Should be recognised by CYGWIN
To: cygwin@cygwin.com
References: <001001d1edf1$a4e1ae90$eea50bb0$@rogers.com> <1C0AE95E-0118-4353-AA77-4D41F1AE9AE1@solidrocksystems.com> <001a01d1eea9$f7949a90$e6bdcfb0$@rogers.com> <76ec05e9-140a-19cb-942b-698582c3d024@gmail.com> <001f01d1ef2c$f04af9e0$d0e0eda0$@rogers.com> <20160805152951.GO25811@calimero.vinschen.de> <57A6ED1C.1060402@gmx.de> <20160808112321.GF32150@calimero.vinschen.de> <e90174df-61b4-17c8-064b-30009e6ad559@gmail.com> <20160808143321.GS25811@calimero.vinschen.de> <8dc84987-802d-30d3-3ebb-2ba25871b561@gmail.com> <CACoZoo3_kBe6zWktTzydhHFzeZMr+AZe1Z2WujagTcLme_ctZg@mail.gmail.com>
From: cyg Simple <cygsimple@gmail.com>
Message-ID: <40db60e7-cc96-d925-1d98-0a80be134d39@gmail.com>
Date: Tue, 9 Aug 2016 11:15:35 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <CACoZoo3_kBe6zWktTzydhHFzeZMr+AZe1Z2WujagTcLme_ctZg@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-IsSubscribed: yes

On 8/9/2016 10:13 AM, Erik Soderquist wrote:
> On Tue, Aug 9, 2016 at 8:58 AM, cyg Simple wrote:
>> I tried "chmod +x foo.txt; ./foo.txt" but that results in Cygwin
>> assuming the text file is a script and executing each line of the file.
>> If PATHEXT were used only to determine that the file should be passed to
>> ShellExecute instead it might be beneficial but since I can easily just
>> do "cmd /c foo.txt" then probably not so much.
> 
> That is the behavior I would expect in any *nix environment, and
> therefore consider the correct behavior within cygwin.
> 

But any text file, regardless of the mode, regardless of #! first line
will be executed at least by bash; I have tested the other shells.  This
isn't expected behavior as I see it.

$ uname -a
CYGWIN_NT-10.0 HAL2002 2.5.2(0.297/5/3) 2016-06-23 14:29 x86_64 Cygwin

$ bash --version
GNU bash, version 4.3.42(4)-release (x86_64-unknown-cygwin)

> Additionally, starting a text editor for foo.txt is not a function of
> PATHEXT, but rather of file association.  In CMD.EXE,
> 
> C:\tmp>echo some text >foo.txt
> 
> C:\tmp>foo
> 'foo' is not recognized as an internal or external command,
> operable program or batch file.
> 
> C:\tmp>echo echo some text >foo.cmd
> 
> C:\tmp>foo
> 
> C:\tmp>echo some text
> some text
> 
> C:\tmp>
> 
> PATHEXT looks for *executable* files, not file association.  I warned
> previously in this thread about getting the two confused.
> 

Thanks for stating this emphasis again.  I overlooked it the first time.
 I'm satisfied that PATHEXT shouldn't be used to determine an executable
file.  I'm not satisfied that we should continue with the .exe
artificial symlink for the same reasons we shouldn't use PATHEXT.
Because of the amount of time to port scripts and software to use the
.exe suffix for executable files it should be an optional configuration
that is on by default with a scheduled deadline (two or three years) to
make it off by default.

-- 
cyg Simple

--
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

