Hi,
[I tried to search the archives but couldn't find anything similar to my needs. Therefore execuse me if this subject is discussed before. And I'll be appreciated if you can point me to the related thread.]
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?
Regards.
P.S. Yep, I checked the scripts at boinkor.net, but I want to use GNU screen instead. (For functionality purposes.)
* Volkan YAZICI yazicivo@ttnet.net.tr 873b34856n.fsf@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
Madhu enometh@meer.net writes:
If you decide on start-stop-daemon and are still having problems with your script let me know.
If anybody would ever want to use, here is a working draft:
http://www.students.itu.edu.tr/~yazicivo/README swank.sh swank-start.lisp
Comments are welcome.
Regards.