[Openmcl-devel] Running CCL as a daemon

Ralf Mattes rm at seid-online.de
Thu Feb 18 08:08:54 PST 2010


On Thu, 2010-02-18 at 10:59 -0500, Keith M. Corbett wrote:
> For Linux I'm using a recipe (handed down from CCL wizards) using
> detachtty[1] and "ccl -e". This works great for apps running Hunchentoot;
> I'm sure it could be used for other daemonic purposes.
> 
> Detachtty is supposed to work on Tiger, but I haven't tried.
GNU screen is another fine tool to keep a backdoor into the Lisp image.
This is fine during debugging, but, as Daniel already mentioned,
problematic during deployment. Running server processes are usually
handled by init scripts/upstart/daemon tools (you name it).

Usually one wants to ensure at least the following:

 * only receive signals meant to be received 

 * no stray open file descriptors

 * get reaped by init in case of sudden death (i.e. no parent
   process).

So, on Unix/Linux a closing _all_ open file descriptors [no SIGPIPE or
similar], leaving the process group [no more controlling termial with a
potential SIGPIPE/SIGHUP] classic double fork [to avoid zombies],
install reasonable signal handlers etc.

Hmm, thinking of it, a '--daemon' option would be a really nice addition
to CCL.

 Cheers, Ralf Mattes
 
>  -Keith
> 
> [1] URL: http://www.cliki.net/detachtty 
> 
> > -----Original Message-----
> > From: openmcl-devel-bounces at clozure.com [mailto:openmcl-devel-
> > bounces at clozure.com] On Behalf Of Ron Garret
> > Sent: Wednesday, February 17, 2010 8:34 PM
> > To: openmcl-devel Devel
> > Subject: [Openmcl-devel] Running CCL as a daemon
> > 
> > What's the right way to run CCL as a daemon?  Do I have to build my own
> > image with a custom initial function, or is there a way to do it with the
> > regular CCL image and the -e or -l command line option?
> > 
> > Thanks,
> > rg
> > 
> > _______________________________________________
> > Openmcl-devel mailing list
> > Openmcl-devel at clozure.com
> > http://clozure.com/mailman/listinfo/openmcl-devel
> 
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel





More information about the Openmcl-devel mailing list