This is the mail archive of the
mailing list for the Cygwin project.
Re: Issue with run.exe and PWD with spaces since last update (Cygwin 1.7.21)
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 17 Jul 2013 16:10:42 +0200
- Subject: Re: Issue with run.exe and PWD with spaces since last update (Cygwin 1.7.21)
- 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>
- Reply-to: cygwin at cygwin dot com
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 GetCommandLineÌ. 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.
> >However, either way, you will have to rebuild run/run2 for both
> >architectures since libcmain.c is linked statically to the executable.
> >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
> >Anyway, if we do it that way, let's hope no other tool is doing the
> 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 Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple