Subject: bug#18745:

From: Juanma Barranquero <[email-masked]>
Date: Thu, 29 Oct 2015 18:22:57 +0100

On Thu, Oct 29, 2015 at 5:17 PM, Eli Zaretskii <[email-masked]> 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