X-Git-Url: http://git.kpe.io/?p=cl-modlisp.git;a=blobdiff_plain;f=base.lisp;fp=base.lisp;h=15ff3e12a450b4b42d3b2cfd136ad3292735b25e;hp=07cc986ed44c756670cf046d4b2c6ed05909afd6;hb=1bb49e27c591c846849c80b6e543a8b207f9dad4;hpb=118ee93d69e2b09d12eb317f6db3fbda113be82f diff --git a/base.lisp b/base.lisp index 07cc986..15ff3e1 100644 --- a/base.lisp +++ b/base.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Dec 2002 ;;;; -;;;; $Id: base.lisp,v 1.1 2003/07/04 19:52:32 kevin Exp $ +;;;; $Id: base.lisp,v 1.2 2003/07/04 22:41:06 kevin Exp $ ;;;; ************************************************************************* (in-package #:modlisp) @@ -17,27 +17,28 @@ (*listener-process* nil)) (defun modlisp-start (&key (port +default-apache-port+) - (function 'sample-process-apache-command)) + (function 'demo-apache-command-processor)) (handler-case - (make-socket-server (next-server-name) function port :format :text - :wait nil) + (make-socket-server (next-server-name) function port + :format :text :wait nil) (error (e) (format t "Error ~A" e) (decf *listener-count*) nil) - (:no-error (proc socket) + (:no-error (process socket) (setq *listener-socket* socket) - (setq *listener-proc* proc) - proc))) - + (setq *listener-process* process) + process))) + (defun modlisp-stop () - (when *listener-proc* - (format t "~&; killing ~d~%" *listener-proc*) - #+sbcl (sb-unix:unix-kill *listener-proc* :sigalrm) - #+allegro (mp:process-kill *listener-proc*) + (when *listener-process* + (format t "~&; killing process ~d~%" *listener-process*) + #+sbcl (sb-thread:destory-thread *listener-process*) + #+allegro (mp:process-kill *listener-process*) #+allegro (mp:process-allow-schedule) - ) - (setq *listener-proc* nil) + #+lispworks (mp:process-kill *listener-process*) + #+cmucl (mp:destroy process *listener-process*) + (setq *listener-process* nil)) (when *listener-socket* (ignore-errors (close *listener-socket*)) (setq *listener-socket* nil))) @@ -51,9 +52,7 @@ (format nil "modlisp-worker-~d" (incf *worker-count*))) -(defun apache-command-issuer (*apache-socket* - &optional - (processor-fun 'demo-apache-command-processor)) +(defun apache-command-issuer (*apache-socket* processor-fun) "generates commands from apache, issues commands to processor-fun" (let ((*close-apache-socket* t)) (unwind-protect @@ -124,15 +123,17 @@ (defun debug-table (command) (with-output-to-string (s) (write-string " - - -" s) + + +
ACL 6.2 + mod_lisp 2.0 + apache + Linux
KeyValue
+mod_lisp debug +" s) (format s "" *apache-nb-use-socket*) (loop for (key . value) in command do - (format s "" key value)) - (write-string "
KeyValue
apache-nb-use-socket~a
~a~a
" s))) + (format s "~a~a" key value)) + (write-string "" s))) (defun fixed-html () " -

mod_lisp 2.0

This is a constant - html string sent by mod_lisp

") +

mod_lisp

+

This is a constant html string sent by mod_lisp

")