[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: connection to tcl/tk
- To: firstname.lastname@example.org
- Subject: Re: connection to tcl/tk
- From: haible (Bruno Haible)
- Date: Fri, 10 Sep 93 12:52:18 +0200
Bjoern Hoefling <email@example.com> asks how to realize a connection
between a CommonLisp and tcl/tk.
> create a bidirectional stream between Lisp and the tcl/tk shell wish.
CLISP supports unidirectional streams to other programs through the
functions MAKE-PIPE-INPUT-STREAM and MAKE-PIPE-OUTPUT-STREAM. I haven't
implemented bidirectional streams because that could lead to deadlocks.
See impnotes.txt for details.
> I discovered only the possibility to realize a communication via 2 files,
> one for the messages from lisp to tcl and one for the way back and Lisp
> and wish must explicitly read from/write on that files.
You may simplify this by using FIFOs (named pipes) instead of ordinary files.
Try something like that:
(shell "mkfifo /tmp/wish-in")
(shell "mkfifo /tmp/wish-out")
(make-two-way-stream (open "/tmp/wish-out" :direction :input)
(open "/tmp/wish-in" :direction :output)
(shell "wish < /tmp/wish-in > /tmp/wish-out")
> I am using both clisp under Linux on a PC (486) and under Unix on Sun.
mkfifo is contained in the GNU file utilities.