[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems using 'run-program'



Project: We are studying 'Information Science' at the 'University of Konstanz' and are currently working on our graduate work. 

Problem description: In this work we aim to integrate a theorem prover written in 'C' in our 'CMU Common Lisp-Environment' (-> version 16b on SPARCstation/Sun 4 with 16/24 Mb memory) by using the LISP-function 'run-program' to start the theorem prover whenever needed. Beside the stdio-streams (stdin, stdout and stderr) which are working very nice, we also tried using the pty-stream from within our LISP-Environment (-> to gain access to data-objects held by the C-program).

(-> "run-program "/stud/fink/test/otter" NIL :pty T :input :stream :output :stream :error :stream") 

Although the function 'process-pty' is signaling, that a stream has been connected,

 (-> "#<Stream for descriptor 30>")

an I/O-Error occurs, when we are trying to read this stream 

(-> "Error in function COMMON-LISP::DO-INPUT.
Error reading #<Stream for descriptor 30>: I/O error")


Our C-program looks like following:

  (-> ...
  if ((fdslav = open("/dev/ttyp0", O_WRONLY)) != -1)
    write(fdslav,"animal(cat dog lamb)",10);
  )


We are not quite sure yet, whether our problem really relies on a bug in our LISP-Environemnt or whether our C-Program is not handling the pty-stream correctly ?
Could you please help us in solving this problem in the next days ?

With regards, Josef and Matthias.