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

RE: lisp2wish and too many open files error?

Mark Mueller wrote:
 > I am using the lisp2wish extension and everything's fine.
 > But after quite a while i get the following
 > message:
 > Handshaking ... ok.
 > Listening:
 > couldn't create error file for command: Too many open files
 > couldn't create error file for command: Too many open files
 > Quitting ... Done
 > T
 > > 

I guess you are using wish-wish (which I first called lisp2wish, but that
name was already owned by another package, doing a similar thing).
The problem stems from a bug (mea culpa) in CLOSE-PROCESS-STREAM.
The following definition fixes the bug:

(defun CLOSE-PROCESS-STREAM (stream)
  #-:KCL (when (typep stream 'two-way-stream)
           (close (two-way-stream-input-stream stream))
           (close (two-way-stream-output-stream stream)))
  #-:KCL (close stream)
  #+:KCL (close-program-stream stream)
  #+:ALLEGRO (sys:os-wait))
(I did not realize, that closing a two-way-stream does NOT close its
constituent streams.)

There is a fixed version of with-wish in 



Matthias Lindner
Bayerisches Forschungszentrum fuer Wissensbasierte Systeme (FORWISS)
Am Weichselgarten 7
91058 Erlangen-Tennenlohe
TEL: +49 9131 691-196
FAX: +49 9131 691-185
NET: lindner@forwiss.uni-erlangen.de
WWW: http://www.forwiss.uni-erlangen.de/~lindner/