From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11052 invoked by alias); 17 Jul 2013 13:36:46 -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 11023 invoked by uid 89); 17 Jul 2013 13:36:45 -0000 X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_50,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS autolearn=ham version=3.3.1 Received: from Unknown (HELO out1-smtp.messagingengine.com) (66.111.4.25) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Jul 2013 13:36:43 +0000 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 3C46A217B7 for ; Wed, 17 Jul 2013 09:36:36 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 17 Jul 2013 09:36:36 -0400 Received: from [158.147.137.108] (unknown [158.147.137.108]) by mail.messagingengine.com (Postfix) with ESMTPA id 0280A6800B6; Wed, 17 Jul 2013 09:36:35 -0400 (EDT) Message-ID: <51E69DE2.10008@cwilson.fastmail.fm> Date: Wed, 17 Jul 2013 14:02:00 -0000 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: The Cygwin Mailing List Subject: Re: Issue with run.exe and PWD with spaces since last update (Cygwin 1.7.21) References: <295777180.20130716202913@mtu-net.ru> <20130717125916.GB21347@calimero.vinschen.de> In-Reply-To: <20130717125916.GB21347@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00347.txt.bz2 On 7/17/2013 8:59 AM, Corinna Vinschen wrote: > This never works, even in any other directory. It's the same problem > which disallows checkX to work, as reported in > http://cygwin.com/ml/cygwin/2013-07/msg00326.html > > The cause is an optimization when calling cygwin executables. So far, > Cygwin executables got their arguments via mmeory copy as well as via > the single-line cmdline argument of CreateProcess. We removed the > latter since it was never meant to work that way in the first place. > > Unfortunately it turns out that run/run2/checkX are Cygwin executables > which don't have a main routine, but rather a WinMain routine. The > latter has a single cmdline argument, which is generated via > GetCommandLine(). But since Cygwin executables get no single-line > command line anymore, this stopped working. This is a pretty unusual situation. I don't know of any other tool -- except perhaps the old frankenstein half-cygwin-half-win32 tclsh.exe and wish.exe -- that does this, outside of run, run2, and checkX. All of which are cygwin-specific (or, at least, cygwin + mingw specific). Could we add a new cygwin_internal routine that triggers the allocation, creation and return of a suitable single-line command? Then run & friends could do (pseudo-code): WinMain() { LPCSTR s = GetCommandLine() #ifdef __CYGWIN__ if s empty s = (LPCSTR) cygwin_internal(CW_WIN32_COMMAND_LINE) #endif -- Chuck -- 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