On 12/1/05, Alexis Rondeau alexis.rondeau@gmail.com wrote:
On 12/1/05, Stephen Compall s11@member.fsf.org wrote:
As far as I can tell, the only way a Swank connection object with style :fd-handler will ever be closed due to EOF (with close-connection) is if either the fd-handler implementation detects the EOF state and knows how to destroy Swank connections, or a condition is raised in the dynamic context of with-reader-error-handler. Looking at the topmost form
in that
context, however, it can only happen if (listen socket) answers T, so that the attempt to read can proceed and raise an eof-error, which gets wrapped up, etc.
I modified process-available-input to test (listen socket) only after calling FN at least once; after all, it always returns T when the handler is called for a normal input state. Without this patch, my fd-handler backend gets into an endless loop calling the handler in install-fd-handler (with the :eof state); with this patch, the socket is closed, removed from *connections*, and from the fd-handler backend properly.
Thank you for the patch, but still I get a new kind of error from sbcl which brings me in the same situation. I removed my ~/.slime directory before starting sbcl to make sure everything is reloaded and recompiled and reinstalled my emacs21-*. Still this is what happens on the host-lisp:
- (swank:create-server :port 4005 :dont-close t)
;; Swank started at port: 4005.
- (swank:create-server :port 4005 :dont-close t)
;; Swank started at port: 4005.
4005
Again, I can connect but on M-x slime-disconnect in emacs this happens now
- ;; Connection to Emacs lost.
;; [end of file on #<SB-SYS:FD-STREAM for "a constant string" {985B171}>]
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "auto-flush-thread" {9987D91}>: #<SB-SYS:FD-STREAM for "a constant string" {985D5F1}> is closed.
Attached is the patch.
I patched my file but still more or less the same problem. I am on a 2.6.11 kernel here, could this mean something?
-- Stephen Compall http://scompall.nocandysoftware.com/blog
Thank you Stephen for your time and effort!
Alexis
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQBDjrinYWjD35Pp0wIRAg00AJ44yB7FIDcrx37iGKPKyGH8q+ZzdQCgm+XT
eXy5zTXCNt99X91OkkpYB4k= =4/SK -----END PGP SIGNATURE-----
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel