[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'system-quote'
From: |
Eli Zaretskii |
Subject: |
Re: new module 'system-quote' |
Date: |
Thu, 10 May 2012 08:13:33 +0300 |
> From: Bruno Haible <address@hidden>
> Cc: address@hidden
> Date: Thu, 10 May 2012 00:35:08 +0200
>
> > Which calls to CreateProcess that used '*' failed? You aren't saying
> > that the second argument to CreateProcess cannot include unquoted '*'
> > characters, are you?
>
> If I recall it correctly, the
> check_one (interpreter, prog, "*");
> case failed: Apparently, when you pass a single unquoted '*' argument
> to CreateProcess, it can fail with GetLastError() = ERROR_PATH_NOT_FOUND.
That is expected and reasonable: the first token in the argument is
the executable to invoke, so it cannot possibly include wildcards. If
an application does that, it's a bug in the application.
Therefore, I think you should not quote wildcard characters such as
'*' and '?'. If you do, it means there's no way of passing to
subsidiary programs command-line arguments that include wildcards.
> > Unfortunately, that's not so. The version of MSVCRT.DLL that ships
> > with Vista and later was updated with the new globbing code. (Its
> > version is also different: 7.0.7600.16385 vs 7.0.2600.5512 on XP.)
> > The function in question is __getmainargs; you can verify with
> > something like pexports that this function lives inside MSVCRT.DLL.
>
> Oh sh*t, they're doing the globbing in the callee, rather than in the
> caller! This is terribly wrong.
It was always like that in MS-land.
> > What is the command to run the test suite for the new module? Is it
> >
> > $ cd gltests && make check-TESTS TESTS=test-system-quote.sh
>
> It is
> $ ./configure (with the appropriate options for mingw, depending on your
> environment)
> $ make
> $ make check
Yes, I already did all that (on XP, so far), I just wanted to be sure
I got it right.
Btw, "make check" seems to become stuck close to forever in the
"test_rwlock" stage; I lost patience and interrupted it. Is that
normal?
> If you get a failure, it's useful to comment out some of the lines
> check_all (SCI_SYSTEM, true, prog); /* equivalent to SCI_WINDOWS_CMD */
> check_all (SCI_WINDOWS_CREATEPROCESS, false, prog);
> check_all (SCI_WINDOWS_CMD, true, prog);
> in gltests/test-system-quote-main.c.
>
> > ? Also, is it sufficient to run the test program from the MSYS shell,
> > or should it also be run from cmd.exe?
>
> The test-system-quote.sh script should be run through bash. It doesn't
> matter how this bash is invoked.
Thanks, will do.
- Re: quotearg.c's shell_quoting_style and MinGW, (continued)
- new module 'system-quote', Bruno Haible, 2012/05/08
- Re: new module 'system-quote', Bruno Haible, 2012/05/08
- Re: new module 'system-quote', Eli Zaretskii, 2012/05/09
- Re: new module 'system-quote', Bruno Haible, 2012/05/09
- Re: new module 'system-quote', Eli Zaretskii, 2012/05/09
- Re: new module 'system-quote', Bruno Haible, 2012/05/09
- Re: new module 'system-quote',
Eli Zaretskii <=
- Re: new module 'system-quote', Bruno Haible, 2012/05/10
- Re: new module 'system-quote', Eli Zaretskii, 2012/05/10
- Re: new module 'system-quote', Paul Eggert, 2012/05/10
- Re: new module 'system-quote', Eli Zaretskii, 2012/05/10
- Re: new module 'system-quote', Bruno Haible, 2012/05/10
- Re: new module 'system-quote', Bruno Haible, 2012/05/10
- Re: new module 'system-quote', Eli Zaretskii, 2012/05/11
- Re: new module 'system-quote', Bruno Haible, 2012/05/12
- Re: new module 'system-quote', Eli Zaretskii, 2012/05/12
- Re: new module 'system-quote', Bruno Haible, 2012/05/12