As seid in the title, I want to deploy a Lisp image which is runnable with Swank. This can be done by using the image dump function provided by lisp implementations. But how can it run as a daemon?
Detachtty
does a good job, but when I deploy, detachtty is required
by the user; I don't like this solution, I just want a standalone one.
Restas-daemon and sb-daemon may be another choice, but both are SBCL-related. Is there a portable solution, or one just for Clozure CL?
I tried the daemon
library from quicklisp too, but when I started
Swank in it, it hung. I could see in the proc file system that the
socket file descriptors were destroyed.
Now I have no idea.
Does anyone have something to advise?
If you want to daemonize it you can use sb-posix:fork under SBCL to perform double fork (see What is the reason for performing a double fork when creating a daemon?). I believe other implementations have POSIX API as well.
If you just want the lisp process to run while the system is running even after you logout then use GNU screen. It let you detach without terminating your (lisp) process.
You may want to try cl-daemonize. From the description, "A tool to daemonize a Lisp process without the need for screen/detachtty".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With