You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2015/06/21 22:00:10 UTC

svn commit: r1686751 - in /tcl/rivet/branches/2.2: ChangeLog VERSION configure.ac src/apache-2/mod_rivet.c

Author: mxmanghi
Date: Sun Jun 21 20:00:10 2015
New Revision: 1686751

URL: http://svn.apache.org/r1686751
Log:
    * configure.ac: changing version to 2.2.4, definition of config.h
    variable RIVET_CONFIGURE_CMD carring the configure full command that
    prepared the build of the module
    * src/apache-2/mod_rivet.c: Improved readability of code in 
    Rivet_ChildHandlers. Add RIVET_CONFIGURE_CMD to 'server' array


Modified:
    tcl/rivet/branches/2.2/ChangeLog
    tcl/rivet/branches/2.2/VERSION
    tcl/rivet/branches/2.2/configure.ac
    tcl/rivet/branches/2.2/src/apache-2/mod_rivet.c

Modified: tcl/rivet/branches/2.2/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.2/ChangeLog?rev=1686751&r1=1686750&r2=1686751&view=diff
==============================================================================
--- tcl/rivet/branches/2.2/ChangeLog (original)
+++ tcl/rivet/branches/2.2/ChangeLog Sun Jun 21 20:00:10 2015
@@ -1,3 +1,10 @@
+2015-06-21 Massimo Manghi <mx...@apache.org>
+    * configure.ac: changing version to 2.2.4, definition of config.h
+    variable RIVET_CONFIGURE_CMD carring the configure full command that
+    prepared the build of the module
+    * src/apache-2/mod_rivet.c: Improved readability of code in 
+    Rivet_ChildHandlers. Add RIVET_CONFIGURE_CMD to 'server' array
+
 2015-06-03 Massimo Manghi <mx...@apache.org>
     * doc/rivet.css: changing selector for namespace table as DocBook
     seems not to honor the id attribute anymore

Modified: tcl/rivet/branches/2.2/VERSION
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.2/VERSION?rev=1686751&r1=1686750&r2=1686751&view=diff
==============================================================================
--- tcl/rivet/branches/2.2/VERSION (original)
+++ tcl/rivet/branches/2.2/VERSION Sun Jun 21 20:00:10 2015
@@ -1 +1 @@
-2.2.3
+2.2.4

Modified: tcl/rivet/branches/2.2/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.2/configure.ac?rev=1686751&r1=1686750&r2=1686751&view=diff
==============================================================================
--- tcl/rivet/branches/2.2/configure.ac (original)
+++ tcl/rivet/branches/2.2/configure.ac Sun Jun 21 20:00:10 2015
@@ -22,9 +22,14 @@ dnl
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([Rivet],[2.2.3])
+AC_INIT([Rivet],[2.2.4])
 TEA_INIT([3.9])
 
+# we are storing here the configure command line, as recursive
+# invocations change the value of the shell variables $0 $*
+
+CONFIGURE_CMD="$0 $*"
+
 AC_CONFIG_AUX_DIR(tclconfig)
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADERS([config.h])
@@ -802,7 +807,7 @@ AC_DEFINE_UNQUOTED(RIVETLIB_DESTDIR,"${R
 AC_DEFINE_UNQUOTED(NAMEOFEXECUTABLE,"${TCLSH_PROG}",[The path to a working tclsh executable])
 AC_DEFINE_UNQUOTED(UPLOAD_DIR,"${RIVET_UPLOAD_DIR}",[Path to the disk directory where uploads are saved])
 AC_DEFINE_UNQUOTED(MAX_POST,[$MAX_POST],[Max size of data in POST operations])
-
+AC_DEFINE_UNQUOTED(CONFIGURE_CMD,"${CONFIGURE_CMD}",[configure command string])
 # We need to use the package path for the installation procedure.  On
 #Debian linux TCL_PACKAGE_PATH may have more than one path in the
 #TCL_PACKAGE_PATH variable, so we have to handle this

Modified: tcl/rivet/branches/2.2/src/apache-2/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.2/src/apache-2/mod_rivet.c?rev=1686751&r1=1686750&r2=1686751&view=diff
==============================================================================
--- tcl/rivet/branches/2.2/src/apache-2/mod_rivet.c (original)
+++ tcl/rivet/branches/2.2/src/apache-2/mod_rivet.c Sun Jun 21 20:00:10 2015
@@ -275,6 +275,15 @@ Rivet_InitServerVariables( Tcl_Interp *i
             TCL_GLOBAL_ONLY);
     Tcl_DecrRefCount(obj);
 
+    obj = Tcl_NewStringObj(RIVET_CONFIGURE_CMD,-1);
+    Tcl_IncrRefCount(obj);
+    Tcl_SetVar2Ex(interp,
+            "server",
+            "RIVET_CONFIGURE_CMD",
+            obj,
+            TCL_GLOBAL_ONLY);
+    Tcl_DecrRefCount(obj);
+
 #if RIVET_DISPLAY_VERSION
     obj = Tcl_NewStringObj(RIVET_VERSION, -1);
     Tcl_IncrRefCount(obj);
@@ -1284,6 +1293,7 @@ Rivet_ChildHandlers(server_rec *s, int i
         parentfunction = top->rivet_child_exit_script;
         errmsg = MODNAME ": Error in Child exit script: %s";
         //errmsg = (char *) apr_pstrdup(p, "Error in child exit script: %s");
+        Tcl_Preserve(top->server_interp);
     }
 
     for (sr = s; sr; sr = sr->next)
@@ -1291,10 +1301,6 @@ Rivet_ChildHandlers(server_rec *s, int i
         rsc = RIVET_SERVER_CONF(sr->module_config);
         function = init ? rsc->rivet_child_init_script : rsc->rivet_child_exit_script;
 
-        if (!init && sr == s) {
-            Tcl_Preserve(rsc->server_interp);
-        }
-
         /* Execute it if it exists and it's the top level, separate
          * virtual interps are turned on, or it's different than the
          * main script. 
@@ -1320,11 +1326,17 @@ Rivet_ChildHandlers(server_rec *s, int i
             Tcl_Release (rsc->server_interp);
         }
 
+        /*
+            it's probably pedantic to unregister the channel just before
+            the child exits and the interpreter is deleted 
+
         if (!init && ((sr == s) || rsc->separate_channels)) 
         {
             Tcl_UnregisterChannel(rsc->server_interp,*(rsc->outchannel));
         }
 
+        */
+
     }
 
     if (!init) {
@@ -1336,11 +1348,10 @@ Rivet_ChildHandlers(server_rec *s, int i
      * as deleting the master implicitly deletes its slave interpreters.
      */
 
-        rsc = RIVET_SERVER_CONF(s->module_config);
-        if (!Tcl_InterpDeleted (rsc->server_interp)) {
-            Tcl_DeleteInterp(rsc->server_interp);
+        if (!Tcl_InterpDeleted (top->server_interp)) {
+            Tcl_DeleteInterp(top->server_interp);
         }
-        Tcl_Release (rsc->server_interp);
+        Tcl_Release (top->server_interp);
     }
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org