Re: SBCL's (run-program ... :output out) is not working on Windows



Kneo Fang <Kneo.Fang@xxxxxxxxx> writes:

Hi everyone,

I'm using SBCL on Windows. The following code returns "hi" on Linux,
but an empty string on Windows:

(with-output-to-string (out)
(run-program "echo" '("hi") :input t :output out :search t))

What should I do to make it work on Windows?

This is the sort of question that's best posed on the sbcl-help
mailing list, but the answer is that the modes of RUN-PROGRAM that
involve using a Lisp stream as input, output, or error for the
external program don't yet work on Windows. Until that changes, as a
workaround, for most uses, you might have the external program write
its output to a file, and then read that file in from Lisp.

--
RmK
.



Relevant Pages

  • Re: Running external program and capture output Shellexecute?
    ... Running external program and capture output Shellexecute? ... so I use the .NET windows forms application to do this. ...
    (microsoft.public.vc.language)
  • Some External Commands Wont Work Under Windows
    ... had no trouble with it (I'm using it on Linux and Windows 2K/XP). ... When the external program is called, ... When I finally exit the Java program by closing its Swing ... InputStream under Windows and the program would freeze after outputting one ...
    (comp.lang.java.help)
  • Re: New freeware: Jarx - the JAR executer
    ... >> There's no need for an external program. ... JAR files are set up to ... >I know Java is not installed on a lot of Windows XP computers. ...
    (comp.lang.java)
  • Re: New freeware: Jarx - the JAR executer
    ... >> There's no need for an external program. ... JAR files are set up to ... >I know Java is not installed on a lot of Windows XP computers. ...
    (comp.lang.java.softwaretools)
  • Re: software will not install
    ... saying "windows cannot access the specified device, ... not have the appropriate permissions to access the item" or another says it ... "cannot execute the external program". ...
    (microsoft.public.windowsxp.general)