[Openmcl-devel] Cockpit Error using SAVE-APPLICATION?

j-anthony at comcast.net j-anthony at comcast.net
Fri Nov 7 14:21:53 PST 2008


Hi Gary,

Thanks again for all the information and insight you have given.  I have a
bit of an odd thing which seems to happen whether I use the --eval approach
or the toplevel-function method/application approach.

In a nutshell, I have a logger which does:

(with-open-file (stream <filespec>
                        :direction :output
                        :if-exists :append
                        :if-does-not-exist :create)
  (format stream <the message> <the args>))

But no output goes/gets to the file.  If run with "standard" start this
works just fine.

The --eval approach is:

(defun aprigo-toplevel ()
  (loop (sleep 1000))
  (quit))

(save-application
 (or (getenv "PERSISTENCE_IMAGE_FILE") "./persistence.lx64"))


and then started with:

ccl -I $APRIGO_INSTALL_PATH/persistence.lx64 --load persistence.init --eval
\(aprigo::aprigo-toplevel\)



The application approach is:

(defclass aprigo-application (ccl::lisp-development-system)
  ())


(defmethod ccl::toplevel-function ((a aprigo-application) init-file)
  (declare (ignore init-file))
  (ccl::startup-ccl)
  (process-run-function "background" #'ccl::housekeeping-loop)
  (unwind-protect
       (loop
          (sleep 1000))
    (quit)))

(save-application
 (or (getenv "PERSISTENCE_IMAGE_FILE") "./persistence.lx64")
 :application-class 'aprigo::aprigo-application)


and then started with:

ccl -I $APRIGO_INSTALL_PATH/persistence.lx64 --load persistence.init



In both cases, everything seems to startup and run.  By which I mean
clients can send messages and get responses and so forth - basically all
the application functionality -- with the exception that the log files are
not written.  I note that the logging facility (log4cl) does not have a
force-output (reasonable, as it does a controlled close after each write). 
I also note that no other file I/O is part of the application (it is all
message based via xml-rpc and sockets, all of which works just fine).


Any ideas/info?  Again, much appreciation for all your help.


/Jon








--------------------------------------------------------------------
mail2web LIVE – Free email based on Microsoft® Exchange technology -
http://link.mail2web.com/LIVE





More information about the Openmcl-devel mailing list