delorie.com/archives/browse.cgi | search |
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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=hVFrtSTK2KTgz5ZY1LGMp5rq6oqz8nnFd7swvtH1fu/3+45ASjCSe | |
lDdadYl3sZh/Wo2KA63b88eqwbJiynliFv6bsMlw4TnuHSJBNdF51LFtNmT7FSfP | |
dBpNCaGQgui/D5n3hU/P//GQ/FRMdorqCnHI6KtEQO7VqYTKPanmRg= | |
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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=bgqZ5Q0oprF3d2XRK37/U0gv2kY=; b=oKqH1Hx2Rl6is7WoD2MMqydSe+Hj | |
NEyKOqwEFtP9mkukIZedbCSpRr48oMv/wx2dXEKzbQUxP1WH7SvhcJAGPt4XVmPD | |
MZ/A8rtMcKU/zBX2E7U5Ht8Ic/heoiEBM59ycMeef1KSAejzlYidqqvtuGXp+Icp | |
ij2+58pT2XmIOyQ= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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=-93.6 required=5.0 tests=AWL,BAYES_50,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=andrey, Repin, repin, Andrey |
X-HELO: | calimero.vinschen.de |
Date: | Wed, 10 Aug 2016 09:50:41 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: PATHEXT is fundamental to Windows and Should be recognised by CYGWIN |
Message-ID: | <20160810075041.wz7jogvldvkziyhc@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <1C0AE95E-0118-4353-AA77-4D41F1AE9AE1 AT solidrocksystems DOT com> <001a01d1eea9$f7949a90$e6bdcfb0$@rogers.com> <76ec05e9-140a-19cb-942b-698582c3d024 AT gmail DOT com> <001f01d1ef2c$f04af9e0$d0e0eda0$@rogers.com> <20160805152951 DOT GO25811 AT calimero DOT vinschen DOT de> <57A6ED1C DOT 1060402 AT gmx DOT de> <20160808112321 DOT GF32150 AT calimero DOT vinschen DOT de> <e90174df-61b4-17c8-064b-30009e6ad559 AT gmail DOT com> <20160808143321 DOT GS25811 AT calimero DOT vinschen DOT de> <769354915 DOT 20160810034446 AT yandex DOT ru> |
MIME-Version: | 1.0 |
In-Reply-To: | <769354915.20160810034446@yandex.ru> |
User-Agent: | Mutt/1.6.2-neo (2016-07-23) |
--sfonlr4bcqdcme5j Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Aug 10 03:44, Andrey Repin wrote: > Greetings, Corinna Vinschen! >=20 > >> As for PATHEXT we can do the following scenario instead. > >>=20 > >> export PATHEXT=3D"$PATHEXT;.TXT" > >> vi foo.txt > >> :set ff=3Ddos > >> i > >> a > >> b > >> c > >> <ESC> > >> :wq > >> cmd /c foo >=20 > > As you show here, the PATHEXT definition is so that it also contains > > file suffixes which require to know the interpreters starting them. To > > implement that, the lib would have to either read the registry to know > > the connection between suffix and interpreter (which is pretty > > convoluted), or it would have to "start the file", aka call ShellExecute > > on the file, without knowing what process will come up as child process. > > In your example that would be Notepad or Write. >=20 > > The way this works is just not feasible to be used from inside the DLL, > > e.g.: >=20 > > - ShellExecute does not return a handle to the called process, so the > > parent can't wait(2) for it. >=20 > ShellExecuteEx does, but it will not help you a single bit. >=20 > > - ShellExecute does not allow to specify an environment for the child > > process. Cygwin's Windows environment is reduced to minimal size. > > Cygwin children inherit the POSIX environment by a simple copy > > process. Only when starting a non-Cygwin process, this process gets > > a full Windows environment by means of the matching CreateProcess > > parameter. >=20 > ShellExecuteEx does, but=E2=80=A6 >=20 > > So, if we actually implement PATHEXT, its usage would be limited to > > suffixes of binary files and files starting with #!<interpreter>, or we > > would have to use a way to start an application which doesn't work well > > in a POSIX scenario, or we would have to search the registry for the > > suffix linkage. Additionally to searching a variable number of files > > for each single file access. >=20 > > Additionally I would (again?) like to stress that PATHEXT is a feature > > of CMD, aka, the shell. It's not a feature of the underlying libs. >=20 > Add to that, ShellExecute(Ex) can't bind to the current console. > Even if the starting program is a console app, it will, always, create a = new > console. Plus, any kind of IO redirection won't work. Sorry, but I won't implement anything like this in the DLL. It's just not what the DLL is for. If you want to start any kind of file like this, use "cygstart". That's what it has been made for. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --sfonlr4bcqdcme5j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXqtzRAAoJEPU2Bp2uRE+g7dQP/3b4jJRHNExWaUS9ahmnRpst jXkSiZ/W3oiXDSihAtiNZkxcCpl2EoonugpxpSXelJoTIQgWDbuIFpsNVXjaSq7x OLr+wSSx/lkrpe4hNv7nrtE482xQmqau6rm3+yS/uNjIzB4tBw23C4ARuI6prMgh d5jYyka5cI4KFiEs3VR64NW/XLkwTAUny/JsJjai4zwiDNcdVh2JAGDag6P5vTZY 0J9K3E51buc0QclUIj4oKcr6S5wDKYmTW+Wv/I4foNiMTjDszsPFyi7kdKZwuXqD KvebzR+Nayhqm/p6FdD6nILsOttoUcPVtVgmIayZsMz9YWQG+nYc6sRkULL39SjZ NvRaa0J3DdUUxibzrSRgbFDiIUJE3bdYqR+qTIjR9ok7jNtqVxHanRU9fdtwDsK5 43CUbx3yYks3WZ5diH8r9bSKQAgDvoSgXfIdHvCDRec4anuf8/AzvaKMdk/M2ezF YdNY0maVt2VlFYx8NOJPs5/G/UEfPc734jufKiTsGHf9u1cWDGep0zfB0DvV8p0k hwCbTROFXM8E8TPgm1xRsLHWGvYsEsvShOCEkrIIkj4RVGWNAp1IAh4EuWO5cShn TRM80EVb9f9Yvj36+hzdaXJHpjZRH3Olcvij2DAQcQJ7aAXqw5SbB1TCHmOAONlX HE9cdKcJDLPiEFU1RNnl =zkY/ -----END PGP SIGNATURE----- --sfonlr4bcqdcme5j--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |