[tbnl-devel] tbnl as unix daemon

Keith Irwin keith.irwin at gmail.com
Mon Jan 30 20:17:31 UTC 2006


Folks--

I want to be able to start/stop a tbnl based app via a script.  I've
done this before with my own server apps, so it all seems relatively
straight forward.  In other words, I have a Makefile which builds a
core, copies shared-libs, packages it all up in a tarball, etc, etc,
such that I can deploy the app on any machine, regardless of whether
or not SBCL is installed.

The problem is that (start-tbnl) starts up a thread, then returns, and
with that return, sbcl quits, and I got no daemon.

Is there a way to start tbnl without it returning?

I suppose I can do something like:

(defun daemon-start ()
  (tbnl:start-tbnl)
  (wait-forever))

and then let my init.d script send a kill signal as I've already
planned.  Is that the recommended method (assuming I can find a
wait-forever function, or just (read) or something)?

In case it needs be said, I really value running tbnl inside a repl
with slime and all that, but this is for the case where that's not
desired or necessary.

Thanks for any lore about what you all do in a similar case! ;)

Keith



More information about the Tbnl-devel mailing list