[Openmcl-devel] Run-program on windows with path names containing spaces
lmaury at gmail.com
Fri Feb 14 15:35:21 UTC 2014
To follow the problem, can you launch on Window, for-example notepad.exe ?
I try but that doesn't work,
(run-program "notepad" '() :input t :output :stream)
and seem to be blocked for ever ?
if I pass an argument (the name of file), in command line for example
(run-program "notepad" '("foo") :input t :output :stream)
it ask me if I want to create it and stay blocked too.
However command from cygwin (touch, cat) work well.
On linux everything work fine.
On Fri, Feb 14, 2014 at 12:10 AM, Anton Vodonosov <avodonosov at yandex.ru>wrote:
> 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
> 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
> lpCommandLine (
> See linux-files.lisp in CCL sources.
> Suppose I want to start a program C:\Program Files
> without arguments.
> 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
> => 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.
> Best regards,
> - Anton
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel