Troubles using open-pipe
I am opening a pipe between my lisp app and a shell program. The program reads from stdin and prints to stdout. The problem is that the program doesn't print until the stdin stream is closed, and I can't figure out a way to close the pipe (a bidirectional-stream of sorts) in only one direction. My code is #| ignore typos |# (setf stream (sys:open-pipe *my-app-path* :direction :io)) (write-line "some stuff" stream) (write-line "some more stuff" stream) ;; this is where I would need to close the ouput-stream (write-char #\eot stream) ;;my attempt (read-line stream) One thing I had tried was to manually (write-char #\eot stream) which (i believe) puts an end-of-file character into the stream, but that *seems* to be caught by lispworks which closes off the stream completely and allows no more reading or writing... strangely enough, however... if I set the program to redirect output to a file, and still try the (write-char #\eot stream), nothing is ever printed to the file. It does work if I redirect to file and run (close stream) instead, but then I can no longer read from the stream, so that is not a good enough solution. Thanks! Andrew