[slime-devel] Re: Connecting swank from lisp
Madhu
enometh at meer.net
Sat Apr 14 01:16:55 UTC 2007
* Volkan YAZICI <yazicivo at ttnet.net.tr> <873b34856n.fsf at ttnet.net.tr> :
| I've been trying to establish a start/stop init script to fire up a
| swank server. IRC folks suggested to use interrupts while shutting
| the swank server down, but I'm looking for if there is any other
| portable way of it. What I was wondering is, would it be possible to
| connect to a swank server from another lisp image and execute
| arbitrary commands (e.g., QUIT, SWANK:QUIT-LISP) on it?
It is possible but if you really need to shutdown, why can't you just
kill the lisp process from UNIX?
Which system are you using? The answer depends on that. Debian uses
the `start-stop-daemon' program in its init scripts. If you start
your process with start-stop-daemon with the --pidfile option, I think
start-stop-daemon with a --stop --pidfile option will kill it.
[You could use start-stop-daemon on other systems but IIRC the debian
version has added this functionality to start-stop-daemon.c shipped
with SysVinit sources, so get the debian version.]
| P.S. Yep, I checked the scripts at boinkor.net, but I want to use GNU
| screen instead. (For functionality purposes.)
I'd just start a swank server in rc.local with something like the
following line and not bother to shutdown:
exec sudo -H -u madhu screen -D -m -c /dev/null -S /path/to/cmucl \
/path/to/rlwrap -c -i -m -r lisp -core /path/to/mycore.core -load \
"swankinit.l" -eval '(swankl)'
[I use the -c option to screen to not read a screeninit file. You
could use -R if you're afraid of it getting started more than once.]
If you decide on start-stop-daemon and are still having problems with
your script let me know.
--
Madhu
More information about the slime-devel
mailing list