5

What is the difference between:

(call-process "cmdproxy"  nil "foo" nil "/c"  "dir")
(call-process "cmd"  nil "foo" nil "/c"  "dir")

?

I seem to get exactly the same results in Emacs 25.1 on Windows 10, except cmdproxy works with the -c switch too.

Update

Probably not everyone knows that Microsoft (Windows) has nothing to do with cmdproxy.exe. It is a binary part of Emacs distribution (i.e. made by Emacs developers) in order to call Windows subprocesses. As noted above, I don't see any sensible benefit over cmd.exe.
Hence this question belongs here, not Windows forums.

antonio
  • 1,762
  • 12
  • 24

1 Answers1

4

I just found this:

Proxy shell designed for use with Emacs on Windows 95 and NT. [...] The main function is simply to process the "-c string" option in the way /bin/sh does, since the standard Windows command shells use the convention that everything after "/c" (the Windows equivalent of "-c") is the input string.

Personally, I don't see cases where you are obliged to pass the shell command "-c string". You can always write

(format "%sc string" 
    (if (eq system-type 'windows-nt) "/" "-"))
antonio
  • 1,762
  • 12
  • 24