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:content-transfer-encoding :in-reply-to; q=dns; s=default; b=MHgD7ItjiJxf+aU3wJjvJYC9INJ8kc 8+jyFHRbYP1AOAnMyIuS36kyNeRxIg+ExMgjGa/z7W1yno4jIRySUgoIH3oJL7/c DebCSdlijpY7iuLORjupEEXEHpN78F+PPp7LZk1M7hxhtDib8W5wEO/9LlzlybBy e9J31hiFIVTC0= 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:content-transfer-encoding :in-reply-to; s=default; bh=df4jWDLigoVT1xHw20tbzaBKpWI=; b=svdm YJE03Vvr358C0ZKht54NbMxVonV+7dokF0CYyN0Qp54nNSW19F67DjERZFPm7wzS RoiTd8lgk/uwEUi8sAo09ieZU1dCqfHo0Qa5oVkAzdRivyiVU0TrgiuAn8ivQbLL uOQMo8V8elDmQbhVs3TsKumZ3yIimmAE9fW8ces= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,TW_YG autolearn=no version=3.3.1 Date: Wed, 17 Jul 2013 16:10:42 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Issue with run.exe and PWD with spaces since last update (Cygwin 1.7.21) Message-ID: <20130717141042.GE32258@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <295777180 DOT 20130716202913 AT mtu-net DOT ru> <20130717125916 DOT GB21347 AT calimero DOT vinschen DOT de> <51E69DE2 DOT 10008 AT cwilson DOT fastmail DOT fm> <20130717134532 DOT GC32258 AT calimero DOT vinschen DOT de> <51E6A3DB DOT 7050605 AT cwilson DOT fastmail DOT fm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <51E6A3DB.7050605@cwilson.fastmail.fm> User-Agent: Mutt/1.5.21 (2010-09-15) On Jul 17 10:02, Charles Wilson wrote: > On 7/17/2013 9:45 AM, Corinna Vinschen wrote: > >On Jul 17 09:36, Charles Wilson wrote: > >>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): > > >That should be unnecessary. The culprit here is the default main > >routine in cygwin's libcmain.c, which calls WinMain if the executable > >doesn't provide its own main. > > > >It doesn't construct the single-line commandline from argv, but rather > >it calls GetCommandLinė. This, obviously, creates an empty command line > >for WinMain. > > > >So, the actual fix is to change libcmain's main() routine to create > >WinMain's cmdline arg from argc/argv. > > Ack. > > >However, either way, you will have to rebuild run/run2 for both > >architectures since libcmain.c is linked statically to the executable. > > Right. > > >So, if we do it this way, we should probably upload a new Cygwin DLL > >with the patched libcmain ASAP, so you can rebuild against the new > >libcmain. Or, actually it would be better you would test this as soon > >as we made the patch, *before* releasing a new Cygwin DLL. > > NP. Both of those packages have been recently rebuilt, so they are > "up to date" with regard to the (relatively recent) w32api and > cygport improvements; it's just a simply rebuild with no other > changes. > > >Anyway, if we do it that way, let's hope no other tool is doing the > >same... > > Seems pretty unlikely to me. Most cygwin apps derive from a unix or > traditional programming model heritage, and use main(). Very few > would seem to derive from a Win32 heritage with WinMain() (why > bother? just run the native program instead of porting a windows app > to cygwin). Uhm. In that case, if ew *really* think your tools are the only affected ones, Why do we bother to fix libcmain.c? Can't you then simply provide your own main() in case of building for Cygwin? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat -- 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