reconnecting and *GLOBALLY-REDIRECT-IO*

Luís Oliveira luismbo at gmail.com
Mon Nov 23 15:53:02 UTC 2015


On Mon, Nov 23, 2015 at 9:44 AM, Gábor Melis <mega at retes.hu> wrote:
> This was on SBCL. Sorry for omitting that detail.

It's working for me on SBCL 1.3.0 and latest SLIME. Let's try and
codify the test case a bit further to see if we can find what differs
between our setups.

SBCL side:

    $ echo "(defparameter swank:*globally-redirect-io* t)" > ~/.swank.lisp
    $ sbcl --eval '(require :swank)' \
           --eval '(swank:create-server :port 4095 :dont-close t)' \
           --eval '(loop (format t "~S~%" *standard-output*) (sleep 2))'
    This is SBCL 1.3.0, an implementation of ANSI Common Lisp.
    More information about SBCL is available at <http://www.sbcl.org/>.

    SBCL is free software, provided as is, with absolutely no warranty.
    It is mostly in the public domain; some portions are provided under
    BSD-style licenses.  See the CREDITS and COPYING files in the
    distribution for more information.
    ;; Swank started at port: 4095.
    #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDOUT* {912A129}>
    #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDOUT* {912A129}>

    [ .. and so on ..]

Emacs side:

    $ emacs -q --eval "(add-to-list 'load-path \"~/src/lisp/slime\")" \
            --eval "(setq slime-contribs '(slime-repl))" \
            --eval "(require 'slime)" \
            --eval "(slime-connect \"127.0.0.1\" 4095)"

And I get this on the REPL:

    #<SYNONYM-STREAM :SYMBOL SWANK::*CURRENT-STANDARD-OUTPUT* {B87C301}>

After `M-x slime-disconnect', I get this on SBCL:

    ;; swank:close-connection: end of file on #<SB-SYS:FD-STREAM for
"socket 127.0.0.1:4095, peer: 127.0.0.1:58832" {B54FB29}>
    #<SYNONYM-STREAM :SYMBOL SWANK::*CURRENT-STANDARD-OUTPUT* {B87C301}>

Running the emacs command again gets me the same output in the
REPL. Were you doing anything different?

Random question: do you have :SB-THREAD in your *FEATURES*?

Cheers,

-- 
Luís Oliveira
http://kerno.org/~luis/



More information about the slime-devel mailing list