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 2017/08/11 20:50:11 UTC

svn commit: r1804855 - in /tcl/rivet/branches/cmake: ChangeLog src/mod_rivet_ng/mod_rivet.c

Author: mxmanghi
Date: Fri Aug 11 20:50:11 2017
New Revision: 1804855

URL: http://svn.apache.org/viewvc?rev=1804855&view=rev
Log:
Further modification to mod_rivet.c

Modified:
    tcl/rivet/branches/cmake/ChangeLog
    tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet.c

Modified: tcl/rivet/branches/cmake/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/ChangeLog?rev=1804855&r1=1804854&r2=1804855&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/ChangeLog (original)
+++ tcl/rivet/branches/cmake/ChangeLog Fri Aug 11 20:50:11 2017
@@ -1,3 +1,10 @@
+2017-08-12 Massimo Manghi <mx...@apache.org>
+	* src/mod_rivet_ng/mod_rivet.c: moving to 
+	Rivet_RunServerInit the call to the bridge specific
+	server initialization script. Confining compilation
+	of the code checking AP_PARENT_PID to Windows
+	systems
+	
 2017-08-11 Massimo Manghi <mx...@apache.org>
 	* src/mod_rivet_ng/mod_rivet.c: add check on 
 	environment variable AP_PARENT_PID to prevent

Modified: tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet.c?rev=1804855&r1=1804854&r2=1804855&view=diff
==============================================================================
--- tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet.c (original)
+++ tcl/rivet/branches/cmake/src/mod_rivet_ng/mod_rivet.c Fri Aug 11 20:50:11 2017
@@ -228,10 +228,22 @@ Rivet_RunServerInit (apr_pool_t *pPool,
     module_globals->server_interp = Rivet_NewVHostInterp(pPool,s); /* root interpreter */
 
     /* We initialize the interpreter and we won't register a channel with it because
-     * we couldn't send data to the stdout anyway */
+     * we couldn't send data to the stdout anyway 
+	 */
 
     Rivet_PerInterpInit(module_globals->server_interp,NULL,s,pPool);
 
+	/* This code is to be included only if we are building for the
+	 * Windows family of OS. The winnt MPM runs the post_config 
+	 * hooks after it has spawned a child process but we don't want
+	 * to run the Tcl server initialization script again. We
+	 * detect we are running in the a child process checking
+	 * the environment variable AP_PARENT_PID 
+	 * (https://wiki.apache.org/httpd/ModuleLife)
+	 */
+	
+	#ifdef WIN32
+	
 	/* if the environment variable AP_PARENT_PID is set 
      * we know we are in a child process of the winnt MPM
      */
@@ -246,7 +258,9 @@ Rivet_RunServerInit (apr_pool_t *pPool,
 		ap_log_error(APLOG_MARK,APLOG_INFO,0,s,
 				 "AP_PARENT_PID undefined, we proceed with server initialization");
 	}
-
+	
+	#endif
+	
     /* We don't create the cache here: it would make sense for prefork MPM
      * but threaded MPM bridges have their pool of threads. Each of them
      * will by now have their own cache
@@ -273,6 +287,10 @@ Rivet_RunServerInit (apr_pool_t *pPool,
         Tcl_DecrRefCount(server_init);
     }
 
+	/* bridge specific server init script */
+	
+	RIVET_MPM_BRIDGE_CALL(mpm_server_init,pPool,pLog,pTemp,s);
+
     return OK;
 }
 
@@ -366,8 +384,6 @@ Rivet_ServerInit (apr_pool_t *pPool, apr
 
     Rivet_RunServerInit(pPool,pLog,pTemp,server);
 
-    RIVET_MPM_BRIDGE_CALL(mpm_server_init,pPool,pLog,pTemp,server);
-
     return OK;
 }
 



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