how to deploy a lisp image with swank, and run as a daemon
Asked Answered
M

2

8

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?

Managerial answered 14/7, 2013 at 5:4 Comment(0)
O
1

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.

Osteophyte answered 7/10, 2013 at 9:41 Comment(0)
I
1

You may want to try cl-daemonize. From the description, "A tool to daemonize a Lisp process without the need for screen/detachtty".

Induce answered 13/7, 2015 at 7:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.