From: Nikodemus Siivola Date: Sun, 24 Apr 2011 13:01:33 +0000 (+0300) Subject: add a REMOVE-FD-HANDLER restart around calling the FD handler function X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=f48ea2de68cabd283203219cf2393e2825fac8e9;p=sbcl.git add a REMOVE-FD-HANDLER restart around calling the FD handler function Otherwise broken FD handlers are even more of a pain than they need to be. Makes bug lp#769162 less irritating, but doesn't actually fix it. --- diff --git a/src/code/serve-event.lisp b/src/code/serve-event.lisp index e3563e6..2b72d84 100644 --- a/src/code/serve-event.lisp +++ b/src/code/serve-event.lisp @@ -322,7 +322,11 @@ happens. Server returns T if something happened and NIL otherwise. Timeout (ecase (handler-direction handler) (:input (sb!unix:fd-isset fd read-fds)) (:output (sb!unix:fd-isset fd write-fds))))))) - (funcall (handler-function handler) - (handler-descriptor handler))) + (with-simple-restart (remove-fd-handler "Remove ~S" handler) + (funcall (handler-function handler) + (handler-descriptor handler)) + (go :next)) + (remove-fd-handler handler) + :next) t))))))