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

Daniel Dickison danieldickison at gmail.com
Fri Mar 20 21:27:32 UTC 2009


Try passing :sharing :lock to run-program.  This should work in 1.3 but not 1.2.

See ticket 216:
http://trac.clozure.com/openmcl/ticket/216

On Fri, Mar 20, 2009 at 5:11 PM, Stas Boukarev <stassats at gmail.com> wrote:
> 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.
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>



More information about the Openmcl-devel mailing list