GNU bug report logs - #18745
24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> users.sourceforge.net>

Date: Thu, 16 Oct 2014 04:35:01 UTC

Severity: minor

Found in versions 25.0.50, 24.3

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #85 received at 18745 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18745 <at> debbugs.gnu.org
Subject: Re: bug#18745:
Date: Thu, 29 Oct 2015 18:22:57 +0100
[Message part 1 (text/plain, inline)]
On Thu, Oct 29, 2015 at 5:17 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> The CreateProcess deficiency we test there has nothing to do with
> trailing whitespace, btw.

That's what I meant: that changing the test to accommodate for a TCC
incompatibility still would make sense because the trailing space is not
what the test is about. Only I said it with less words and zero clarity.

> Anyway, does it work to put "ComSpec=%windir%\system32\cmd.exe" into
> process-environment before running that code?

No. I had already tried that, and now I've done some more checking. (In all
cases, I run the test from the shell with emacs -batch -l ert -l
process-test [etc]).

- Testing from CMD.EXE works (as expected)
- Setting COMSPEC to point to CMD and testing from TCC.EXE also works.
- let-binding process-environment to (cons
"ComSpec=C:\\windows\\system32\\cmd.exe" process-environment) around the
test does not work.
- Using (setenv "ComSpec" "C:\\Windows\\system32\\cmd.exe") or (setenv
"ComSpec" "%windir%\\system32\\cmd.exe" t) in the test function before
calling call-process does not work
- Same for variants with forward slashes, %windir% vs. explicit path, etc.

I would be very surprised that the process-environment does not affect
call-process, so I *must* be missing something obvious. I'll take a closer
look as soon as I have a little more time.

    J
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 208 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.