tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r702429 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Date Tue, 07 Oct 2008 10:33:09 GMT
Author: mturk
Date: Tue Oct  7 03:33:08 2008
New Revision: 702429

URL: http://svn.apache.org/viewvc?rev=702429&view=rev
Log:
Do a simple thread_join for a detached watchdog thread

Modified:
    tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=702429&r1=702428&r2=702429&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Tue Oct  7 03:33:08 2008
@@ -234,6 +234,7 @@
 static char *jk_shm_file = NULL;
 static size_t jk_shm_size = 0;
 static int jk_watchdog_interval = 0;
+static int jk_watchdog_done = 0;
 
 /*
  * Worker stuff
@@ -2199,7 +2200,8 @@
     /* Force the watchdog thread exit */
     if (jk_watchdog_interval > 0) {
         jk_watchdog_interval = 0;
-        apr_sleep(apr_time_from_sec(2));
+        while (!jk_watchdog_done)
+            apr_sleep(apr_time_from_sec(1));
     }
     jk_shm_close();
     return APR_SUCCESS;
@@ -2836,6 +2838,7 @@
                   "Watchdog thread running");
         wc_maintain(conf->log);
     }
+    jk_watchdog_done = 1;
     return NULL;
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message