On Fri, 2012-11-16 at 17:26 -0500, Mirko Vukovic wrote:
> I am trying to launch a gnuplot process and send commands to it. But
> I get a broken pipe.
> Here is an example.
> This will get gnuplot going
> (external-program:start *executable* '("-persist" "-e" "plot sin(x)")
> :input :stream
> :output :stream)
> *gnuplot-input* (sb-ext:process-input *gnuplot*)
> *gnuplot-output* (sb-ext:process-output *gnuplot*))
> Now I try to quit:
> (format *gnuplot-input* "quit~%")
> (finish-output *gnuplot-input*)
> After the last command I get broken pipe.
> This example is a bit academic. In general, I want to send other
> plotting commands, not to quit.
> Is that possible?
If you start it with "-e", gnuplot goes into batch mode and does not
accept commands from stdin, ergo the EPIPE.
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.