[erlang-questions] Still problems with open_port({spawn, XYZ}, ...) under Windows?

James Hague <>
Wed Apr 22 21:00:33 CEST 2009


> Looks like it's still not possible to spawn a program with spaces in
> the name, even in R13B.  True?

To answer my own question, yes.  This works:

open_port({spawn,"d:\\tools\\unzip.exe"}, [exit_status,stderr_to_stdout]).
#Port<0.437>

Then I renamed the tools directory to "t ools" (space after the "t"):

open_port({spawn,"d:\\t ools\\unzip.exe"}, [exit_status,stderr_to_stdout]).
** exception error: einval
     in function  open_port/2
        called as open_port({spawn,"d:\\t ools\\unzip.exe"},
                            [exit_status,stderr_to_stdout])

Surrounding the pathname with escaped quotes doesn't work.  Digging
through the code, however, it looks like there is support for quoted
paths, but it appears to not be working.

James



More information about the erlang-questions mailing list