[Openmcl-devel] Run-program on windows with path names containing spaces
avodonosov at yandex.ru
Thu Feb 13 23:10:40 UTC 2014
I investigated this, it's definitely a bug in CCL 1.9
On CCL 1.9 on Windows, when you call ccl:run-program, it's parameter PROGRAM is preppended
to the ARGS parameter to form a single list of strings, then this list is passed
to ccl::make-windows-command-line to form a single command line string, and then
that string is passed to CreateProcess WinAPI function as the second parameter
See linux-files.lisp in CCL sources.
Suppose I want to start a program C:\Program Files (x86)\acl90express\alisp.exe
In Lisp it must be called like this:
(ccl:run-program "C:\\Program Files (x86)\\acl90express\\alisp.exe" '())
WinAPI CreateProcess function should receive the following lpCommandLine
"\"C:\\Program Files (x86)\\acl90express\\alisp.exe\""
i.e. all the executable path must be surrounded by double quotes to prevent
spaces in the path to be interpreted as separators.
But CCL computes different thing:
(format t "~A~%" (ccl::make-windows-command-line '("C:\\Program Files (x86)\\acl90express\\alisp.exe")))
=> C:\Program" "Files" "(x86)\acl90express\alisp.exe
i.e. CCL surrounds every space by double quotes, instead of surrounding
whole executable path.
Probably we need to reopen #858 or submit a new ticket.
More information about the Openmcl-devel