[slime-devel] Output lost after disconnect reconnect
Gábor Melis
mega at retes.hu
Thu Apr 3 10:34:21 UTC 2008
After a disconnect, reconnect long running worker threads that were
spawn for instance by C-x C-e in a lisp buffer send their output to the
void.
Detailed process to reproduce:
1. start an sbcl
2. (require 'asdf)
(asdf:oos 'asdf:load-op 'swank)
(setq swank:*globally-redirect-io* t)
(setq swank:*global-debugger* t)
(setf swank:*use-dedicated-output-stream* nil)
(swank:create-server :dont-close t :port 4007)
3. connect from slime
4. from a buffer eval
(loop
(sleep 5)
(print 'hello *trace-output*)
(force-output *trace-output*))
5. disconnect
[At this point output should be going to the terminal where sbcl was
started which is the case when the above snippet is wrapped in
(sb-thread:make-thread (lambda () ...))). Instead it goes to nowhere.]
6. slime-connect again
7. observe that nobody says hello anymore
The attached patch aims to fix this by:
* swank.lisp (maybe-call-with-io-redirection): don't
CALL-WITH-REDIRECTED-IO if *GLOBALLY-REDIRECT-IO*. Fixes
lost output after disconnect, reconnect.
Cheers,
Gábor Melis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: redirect.patch
Type: text/x-diff
Size: 1919 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20080403/5d207cfc/attachment.patch>
More information about the slime-devel
mailing list