[slime-devel] [patch] closing connections with :fd-handler style
Stephen Compall
s11 at member.fsf.org
Thu Dec 1 08:47:35 UTC 2005
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.
Attached is the patch.
--
Stephen Compall
http://scompall.nocandysoftware.com/blog
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slime-fdd1.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20051201/bfa9f8c8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20051201/bfa9f8c8/attachment.sig>
More information about the slime-devel
mailing list