Subject: Re: Remote debugging
From: (Rob Warnock)
Date: Tue, 08 Aug 2006 04:45:03 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Brian Downing  <> wrote:
| * Running the Lisp image in screen(1) or attachtty(1).  ...
| * Load Swank in the image ...
| * Roll your own method of injecting commands.
|   There are myriad ways this could be done.

Various implementations may provide something useful,

    > (describe 'mp::start-lisp-connection-listener)
    START-LISP-CONNECTION-LISTENER is an internal symbol in the
       MULTIPROCESSING package.
    Function arguments:
      (&key (port 1025) (password (random (expt 2 24))))
    Function documentation:
      Create a Lisp connection listener, listening on a TCP port for new
      connections and starting a new top-level loop for each. If a password
      is not given then one will be generated and reported.  A search is
      performed for the first free port starting at the given port which
      defaults to 1025.
    > (mp::start-lisp-connection-listener :password "foobar")

    #<Process Anonymous {489C2AB5}>
    ;;; Started lisp connection listener on port 1025 with password foobar
    > (defun foo (x) (+ x 37))

Then in another window [note that the password is read with the
Lisp reader, so in this case we must type the string quotes, too]:

    $ telnet localhost 1025
    Connected to localhost.
    Escape character is '^]'.
    Enter password: "foobar"

    > (foo 10)

    > ^]
    telnet> q
    Connection closed.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607