This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git


The following commit(s) were added to refs/heads/master by this push:
     new 85a73dc  further elaborating lazy bridge documentation
     new 074cf4f  Merge branch 'master' of 
https://gitbox.apache.org/repos/asf/tcl-rivet
85a73dc is described below

commit 85a73dc13ae014d58b7f4028433cfe7033e0585a
Author: Massimo Manghi <mxman...@apache.org>
AuthorDate: Mon Feb 5 09:38:25 2024 +0100

    further elaborating lazy bridge documentation
---
 doc/xml/lazybridge.xml            | 27 +++++++++++++--------------
 src/mod_rivet_ng/rivet_lazy_mpm.c | 20 +++++++++-----------
 2 files changed, 22 insertions(+), 25 deletions(-)

diff --git a/doc/xml/lazybridge.xml b/doc/xml/lazybridge.xml
index 6e18c04..4b95f0b 100644
--- a/doc/xml/lazybridge.xml
+++ b/doc/xml/lazybridge.xml
@@ -172,7 +172,7 @@ void LazyBridge_ChildInit (apr_pool_t* pool, server_rec* 
server)
        <section>
         <title>Handling Tcl's exit core command</title> 
        <para>
-               Most of the fields in the <command>mpm_bridge_status</command> 
are meant to deal 
+               Most fields in the <command>mpm_bridge_status</command> are 
meant to deal
                with the child exit process. Rivet supersedes the Tcl core's 
exit function
                with a <command>::rivet::exit</command> function and it does so 
in order to curb the effects
                of the core function that would force a child process to 
immediately exit. 
@@ -192,8 +192,8 @@ void LazyBridge_ChildInit (apr_pool_t* pool, server_rec* 
server)
                programming. We cannot stress this point enough. If your 
application must bail out
                for some reason focus your attention on the design to find the 
most appropriate
                route to exit and whenever possible avoid 
-               calling <command>exit</command> at all (which basically wraps a
-               C call to Tcl_Exit). Anyway the Rivet implementation partially 
transforms
+               calling <command>exit</command> (which basically wraps a
+               C call to Tcl_Exit) at all. Anyway the Rivet implementation 
partially transforms
                <command>exit</command> in a sort of special 
<command>::rivet::abort_page</command>
                implementation whose eventual action is to call the 
<command>Tcl_Exit</command>
                library call. See the <command><xref 
linkend="exit">::rivet::exit</xref></command>
@@ -202,10 +202,9 @@ void LazyBridge_ChildInit (apr_pool_t* pool, server_rec* 
server)
        <para>
                Both the worker bridge and lazy bridge 
                implementations of <command>mpm_exit_handler</command> call the 
function pointed 
-               by <command>mpm_finalize</command> which also the function 
called by the framework 
-               when the web server shuts down.
-               See these functions' code for further details, they are very 
easy to 
-               read and understand
+               by <command>mpm_finalize</command> which is also the function 
called by the framework
+               when the web server shuts down. See these functions' code for 
further details,
+               they are very easy to read and understand
        </para>
        </section>
        <section>
@@ -233,10 +232,10 @@ typedef struct lazy_tcl_worker {
     request_rec*        r;
     int                 ctype;
     int                 ap_sts;
-    rivet_server_conf*  conf;               /* rivet_server_conf* record       
         */
+    rivet_server_conf*  conf;               /* rivet_server_conf* record */
 } lazy_tcl_worker;</programlisting>
        <para>
-               The server field is assigned with the virtual host server 
record. Whereas the <command>conf</command>
+               The server field is initialized with the virtual host server 
record. Whereas the <command>conf</command>
                field keeps the pointer to a run time computed 
<command>rivet_server_conf</command>. This structure
                may change from request to request because the request 
configuration changes when the URL may refer 
                to directory specific configuration in <command>&lt;Directory 
...&gt;...&lt;/Directory&gt;</command> 
@@ -331,10 +330,10 @@ int Lazy_MPM_Request (request_rec* r,rivet_req_ctype 
ctype)
        <programlisting>/*
  * -- request_processor
  *
- * The lazy bridge worker thread. This thread prepares its control data and 
- * will serve requests addressed to a given virtual host. Virtual host server
- * data are stored in the lazy_tcl_worker structure stored in the generic 
- * pointer argument 'data'
+ * The lazy bridge worker thread. This thread initialized its control data and 
+ * prepares to serve requests addressed to the virtual host which is meant to 
work
+ * as a content generator. Virtual host server data are stored in the 
+ * lazy_tcl_worker structure stored in the generic pointer argument 'data'
  * 
  */
 
@@ -470,4 +469,4 @@ SeparateChannels       Off</programlisting>
                which are simply ignored
        </para>
        </section>
- </section>
\ No newline at end of file
+ </section>
diff --git a/src/mod_rivet_ng/rivet_lazy_mpm.c 
b/src/mod_rivet_ng/rivet_lazy_mpm.c
index 72fcc1a..0c0a7ed 100644
--- a/src/mod_rivet_ng/rivet_lazy_mpm.c
+++ b/src/mod_rivet_ng/rivet_lazy_mpm.c
@@ -138,10 +138,8 @@ static void Lazy_RunConfScript (rivet_thread_private* 
private,lazy_tcl_worker* w
             server_rec* root_server = module_globals->server;
 
             
ap_log_error(APLOG_MARK,APLOG_ERR,APR_EGENERAL,root_server,errmsg,function);
-            ap_log_error(APLOG_MARK,APLOG_ERR,APR_EGENERAL,root_server,
-                         "errorCode: %s",Tcl_GetVar(interp,"errorCode",0));
-            ap_log_error(APLOG_MARK,APLOG_ERR,APR_EGENERAL,root_server,
-                         "errorInfo: %s",Tcl_GetVar(interp,"errorInfo",0));
+            
ap_log_error(APLOG_MARK,APLOG_ERR,APR_EGENERAL,root_server,"errorCode: %s", 
Tcl_GetVar(interp, "errorCode", 0));
+            
ap_log_error(APLOG_MARK,APLOG_ERR,APR_EGENERAL,root_server,"errorInfo: %s", 
Tcl_GetVar(interp, "errorInfo", 0));
         }
 
         Tcl_DecrRefCount(tcl_conf_script);
@@ -151,10 +149,10 @@ static void Lazy_RunConfScript (rivet_thread_private* 
private,lazy_tcl_worker* w
 /*
  * -- request_processor
  *
- * The lazy bridge worker thread. This thread prepares its control data and
- * will serve requests addressed to a given virtual host. Virtual host server
- * data are stored in the lazy_tcl_worker structure stored in the generic
- * pointer argument 'data'
+ * The lazy bridge worker thread. This thread initializes its control data and
+ * prepares to serve requests addressed to the virtual host which is meant to 
work
+ * as a content generator. Virtual host server data are stored in the
+ * lazy_tcl_worker structure stored in the generic pointer argument 'data'
  *
  */
 
@@ -384,8 +382,9 @@ int LazyBridge_Request (request_rec* r,rivet_req_ctype 
ctype)
      * be avoided at any costs when programming with mod_rivet
      */
 
-    if (module_globals->mpm->server_shutdown == 1) {
-        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r,
+    if (module_globals->mpm->server_shutdown == 1)
+    {
+        ap_log_rerror(APLOG_MARK,APLOG_ERR,APR_EGENERAL,r,
                       MODNAME ": http request aborted during child process 
shutdown");
         apr_thread_mutex_unlock(mutex);
         return HTTP_INTERNAL_SERVER_ERROR;
@@ -509,7 +508,6 @@ apr_status_t LazyBridge_Finalize (void* data)
  *
  */
 
-
 int LazyBridge_ExitHandler(rivet_thread_private* private)
 {
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@tcl.apache.org
For additional commands, e-mail: commits-h...@tcl.apache.org

Reply via email to