[Openmcl-devel] Accessing external process's streams from differen threads.

Stas Boukarev stassats at gmail.com
Fri Mar 20 14:11:55 PDT 2009


How can I access streams of an external process from another thread?
The following code doesn't work:

(let* ((process (ccl:run-program "yes" () :wait nil :output :stream))
       (stream (ccl:external-process-output-stream process)))
  (ccl:process-run-function :foo (lambda () (read-line stream)))
  (ccl:signal-external-process process 15))

> Error: Stream #<BASIC-CHARACTER-INPUT-STREAM ISO-8859-1 (PIPE/5) #x300041128BFD> is private to #<TTY-LISTENER listener(1) [Active] #x300040EFE04D>
> While executing: CCL::CHECK-IOBLOCK-OWNER, in process FOO(3).


;;;
;;; #<PROCESS FOO(3) [Active] #x30004112701D> requires access to Shared Terminal Input
;;; Type (:y 3) to yield control to this thread.
;;;

-- 
With best regards, Stas.



More information about the Openmcl-devel mailing list