Hi all,
I am struggling with the process extension of cmu common lisp. The idea
is to have some code running in lasp that passes a symbol of to some
code written in a different language, and running as a subprocess.
CMUCL defines extensions:run-program, that takes the name of a program
and the arguments to pass to the program. In addition, there are the
following keywords:
:wait Suspends the lisp process while the child runs. I set this
to nil.
:input specify a stream to send to the child as input the keyword
:stream causes the lisp process to grab the child's stdin.
:output like :input. :stream grabs the childs stdout.
I have written a simple slave process that does nothing more than read
stdin, and write something to stdout. Everything works perfectly the
first time (lisp sends OK, the slave gets it, sends something back, and
then lisp reads the result OK). The second time I write to the stream
from lisp, I get an unparsable error that claims something is wrong with
the stream.
It may or may not matter that I call force-output on the stream that is
input to the child process. When I don't, then lisp hangs in read.
Anyone?
Jon Handler
········@ils.nwu.edu
Jon Handler <········@penguin.ils.nwu.edu> writes:
>I am struggling with the process extension of cmu common lisp. The idea
>is to have some code running in lasp that passes a symbol of to some
>code written in a different language, and running as a subprocess.
[...]
>I have written a simple slave process that does nothing more than read
>stdin, and write something to stdout. Everything works perfectly the
>first time (lisp sends OK, the slave gets it, sends something back, and
>then lisp reads the result OK). The second time I write to the stream
>from lisp, I get an unparsable error that claims something is wrong with
>the stream.
Could you post pieces of Lisp and C code that reproduce the problem?
What platform are you on?
There is, BTW, a "cmucl-help" mailing list. See
http://www.cons.org/cmucl
Martin
--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
···············@wavehh.hanse.de http://cracauer.cons.org Fax.: +4940 5228536
"As far as I'm concerned, if something is so complicated that you can't ex-
plain it in 10 seconds, then it's probably not worth knowing anyway"- Calvin