[Openmcl-devel] streams to external processes

Martin Loetzsch martin.loetzsch at gmail.com
Wed Jul 2 05:57:27 PDT 2008


Dear all,

On my Mac G4 I just updated to the latest version of clozure cl (my  
previous version was openmcl from October 2005).

I made the change in order to be able to run more recent version of  
hunchentoot and everything is fine.

There is one thing that does not work and that used to work before:

(defparameter *stream*
   (ccl:external-process-input-stream
		      (ccl:run-program "gnuplot" nil :input :stream :wait nil)))

This makes a stream to write into a pipe, e.g. for gnuplot. The  
process gets started but something is wrong with the stream. When I do

(format *stream* "~c plot sin(x)~c" #\linefeed #\linefeed)
or
(format *stream* "foo")

then I get this error:

Stream #<BASIC-CHARACTER-OUTPUT-STREAM ISO-8859-1 (PIPE/10)  
#x85AC62E> is private to #<PROCESS worker(8) [Exhausted] #x85A982E>
    [Condition of type SIMPLE-ERROR]


Backtrace:
   0: (CCL::CHECK-IOBLOCK-OWNER #S(CCL::IOBLOCK :STREAM #<BASIC- 
CHARACTER-OUTPUT-STREAM ISO-8859-1 (PIPE/10) #x85AC62E>
                      :UNTYI-CHAR NIL :INBUF NIL
                      :OUTBUF #<IO-BUFFER  (UNSIGNED-BYTE
                                            8) 0/0/128 #x85AC52E>
                      :ELEMENT-TYPE ...))
   1: (WRITE-STRING "foo" #<BASIC-CHARACTER-OUTPUT-STREAM ISO-8859-1  
(PIPE/10) #x85AC62E> ':START 0 ':END 'NIL)
   2: (FORMAT #<BASIC-CHARACTER-OUTPUT-STREAM ISO-8859-1 (PIPE/10)  
#x85AC62E> "foo")


I checked the manual (http://ccl.clozure.com/manual/chapter8.4.html)  
and to me it seems that this should still work.


Thank you for any responses,


Martin Loetzsch





More information about the Openmcl-devel mailing list