[slime-devel] Re: [patch] closing connections with :fd-handler style
Stephen Compall
s11 at member.fsf.org
Wed Dec 28 00:52:04 UTC 2005
On Thu, 2005-12-01 at 02:47 -0600, I 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.
>
> Attached is the patch.
I thought maybe the DO loop was a bad idea, so here is a version that
uses LOOP.
--
Stephen Compall
http://scompall.nocandysw.com/blog
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slime-fdd2.patch
Type: text/x-patch
Size: 645 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20051227/07bc5238/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/20051227/07bc5238/attachment.sig>
More information about the slime-devel
mailing list