diff --git a/source/clog-system.lisp b/source/clog-system.lisp index d12c864..c3dc60e 100644 --- a/source/clog-system.lisp +++ b/source/clog-system.lisp @@ -129,15 +129,23 @@ BOOT-FILE will be used. If BOOT-FILE is nil path is removed." (setf (gethash path *url-to-on-new-window*) on-new-window-handler) (remhash path *url-to-on-new-window*))) +;;;;;;;;;;;;;;;;;; +;; is-running-p ;; +;;;;;;;;;;;;;;;;;; + +(defun is-running-p () + *clog-running*) + ;;;;;;;;;;;;;; ;; shutdown ;; ;;;;;;;;;;;;;; (defun shutdown () "Shutdown CLOG." - (clrhash *url-to-on-new-window*) - (setf *clog-running* nil) - (clog-connection:shutdown-clog)) + (when *clog-running* + (clrhash *url-to-on-new-window*) + (setf *clog-running* nil) + (clog-connection:shutdown-clog))) ;;;;;;;;;;;;;;;; ;; debug-mode ;; diff --git a/source/clog.lisp b/source/clog.lisp index 5e58a8d..ae068f6 100644 --- a/source/clog.lisp +++ b/source/clog.lisp @@ -64,6 +64,7 @@ embedded in a native template application.)" "CLOG Startup and Shutdown" (initialize function) (set-on-new-window function) + (is-running-p function) (shutdown function) (debug-mode function) (open-browser function))