[Openmcl-devel] forking to dump?

Hans Hübner hans at huebner.org
Wed Jul 9 13:41:25 PDT 2008


Hi,

one of my applications is a web server (it needs to run continously)
with a very large in-memory data set.  I can recover the data into a
freshly started Lisp from files, but in order to save time, I would
like to regularily dump images.  Now, dumping an image takes 1-2
minutes and the Lisp exits when it is done, so I thought it might be
an option to duplicate the running process by forking, then dump the
image in the child process.  I did some experiments, but my naive
attempts do not work:

(when (zerop (#_fork))
  (ccl:save-application "teh-dump"))

It appears as if SAVE-APPLICATION does work at all in the child
process - it just seems to exit having done nothing.

Is there some way how this can be made to work?  In principle, fork
should create a process with the same memory layout as the parent
process, but propably there are issues with threads that one needs to
handle?

Thanks,
Hans



More information about the Openmcl-devel mailing list