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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 18745 <at> debbugs.gnu.org
Subject: bug#18745: 
Date: Fri, 30 Oct 2015 16:55:03 +0200
> From: Juanma Barranquero <lekktu <at> gmail.com>
> Date: Fri, 30 Oct 2015 15:25:37 +0100
> Cc: 18745 <at> debbugs.gnu.org
> 
> C:\...\test> emacs -Q --batch --eval "(let ((process-environment '(\"TEST=BBB\"
> \"COMSPEC=C:\\Windows\\system32\\cmd.exe\"))) (call-process
> \"c:/devel/emacs/repo/trunk/test.bat\"))"
> 
> C:\...\test> type test.log
> TEST=BBB
> COMSPEC=C:\bin64\JPSoft\TCMD\TCC.EXE
> 
> Is that expected?

No, but it could be some TCC magic, aimed at intercepting any explicit
references to cmd.exe.

What happens if you replace test.bat with a compiled C program that
calls getenv to look at these two variables -- do you see the same
there?  (You could use Emacs with a suitable --eval argument to
emulate such a "C program".)





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.