From: Kevin M. Rosenberg Date: Tue, 8 Jul 2003 14:00:53 +0000 (+0000) Subject: r5258: *** empty log message *** X-Git-Tag: debian-0.6-2~29 X-Git-Url: http://git.kpe.io/?p=cl-modlisp.git;a=commitdiff_plain;h=4545c194136bd916c6fd240a148804c5cccfec63 r5258: *** empty log message *** --- diff --git a/README b/README index afe3b15..439c8a1 100644 --- a/README +++ b/README @@ -1,11 +1,34 @@ +INTRODUCTION +------------ This package provided the Lisp side of the interface to Marc Battyani's mod_lisp apache module (http://www.fractalconcept.com). -It has robust support for multiprocessing and for keeping track -of worker processes allow for cleaning shutting down the server -and all associated proceses and sockets. +cl-modlisp has cross-implementation support for sockets and +multiprocessing. This packages maintains a list of listener processes +and sockets as well as worker processes and sockets. cl-modlisp will +cleanly close sockets and kill processes when a listener is stopped. +REREQUISITES +------------ +1. Apache 1.3.x +2. mod_lisp apache module (http://www.fractalconcept.com) +3. cl-kmrcl library (http://files.b9.com/kmrcl) +4. asdf +QUICKSTART +---------- +1. Install mod_lisp as described on the mod_lisp web site +2. Add something like the below to httpd.conf and then restart apache + LispServer 127.0.0.1 20123 "localhost" + AddHandler lisp-handler .lsp +3. Load cl-modlisp and cl-kmrcl +4. Start the server with + (ml:modlisp-start :port 20123)) +5. Try some demostration pages + lynx http://localhost/fixed.lsp + lynx http://localhost/debug.lsp +6. Shutdown the all cl-modlisp servers with + (ml:modlisp-stop-all) diff --git a/base.lisp b/base.lisp index bcf84b5..04cfa38 100644 --- a/base.lisp +++ b/base.lisp @@ -7,20 +7,22 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Dec 2002 ;;;; -;;;; $Id: base.lisp,v 1.6 2003/07/08 06:40:00 kevin Exp $ +;;;; $Id: base.lisp,v 1.7 2003/07/08 14:00:53 kevin Exp $ ;;;; ************************************************************************* (in-package #:modlisp) (defun modlisp-start (&key (port +default-apache-port+) (processor 'demo-apache-command-processor) - (processor-args nil)) + (processor-args nil) + (catch-errors t)) (let ((listener (make-instance 'listener :port port :name (next-server-name) :function 'apache-command-issuer :function-args (cons processor processor-args) :format :text - :wait nil))) + :wait nil + :catch-errors catch-errors))) (handler-case (make-socket-server listener) (error (e) diff --git a/debian/changelog b/debian/changelog index ccfe6e2..20f88b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-modlisp (0.3-1) unstable; urgency=low + + * New version + + -- Kevin M. Rosenberg Tue, 8 Jul 2003 07:45:08 -0600 + cl-modlisp (0.2-1) unstable; urgency=low * New upstream version diff --git a/server.lisp b/server.lisp index 1d27de4..e3c6775 100644 --- a/server.lisp +++ b/server.lisp @@ -23,14 +23,16 @@ (setf (slot-value self 'thread-fun) #'(lambda () (unwind-protect - (handler-case - (apply (listener-function listener) - connection - (function-args listener)) - (error (e) - (cmsg "Error ~A [~A]" e name) - (error e) - )) + (if (catch-errors listener) + (handler-case + (apply (listener-function listener) + connection + (function-args listener)) + (error (e) + (cmsg "Error ~A [~A]" e name))) + (apply (listener-function listener) + connection + (function-args listener))) (progn (errorset (close-active-socket connection) nil) (cmsg-c :threads "~A ended" name) diff --git a/variables.lisp b/variables.lisp index f107c38..4e8958a 100644 --- a/variables.lisp +++ b/variables.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Dec 2002 ;;;; -;;;; $Id: variables.lisp,v 1.5 2003/07/08 06:40:00 kevin Exp $ +;;;; $Id: variables.lisp,v 1.6 2003/07/08 14:00:53 kevin Exp $ ;;;; ************************************************************************* (in-package #:modlisp) @@ -40,6 +40,7 @@ :documentation "list of worker threads") (name :initform "" :accessor name :initarg :name) (wait :initform nil :accessor wait :initarg :wait) + (catch-errors :initform nil :accessor catch-errors :initarg :catch-errors) (format :initform :text :accessor listener-format :initarg :format))) (defvar *active-listeners* nil