aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2001-05-03 20:26:56 +0000
committertradke <tradke@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2001-05-03 20:26:56 +0000
commit47e9467b27a060cc84ef19a4244caa04980a6d2b (patch)
tree2b4414181801c00243bd759f0600639f778eacf4 /src
parent0ce1ba080af11013a2f8450438ce6322ef85c68b (diff)
Set the "HTTPD::terminate" parameter at shutdown in order to flag termination
to the polling thread. git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@123 1faa4e14-9dd3-4be0-9f0e-ffe519881164
Diffstat (limited to 'src')
-rw-r--r--src/Startup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Startup.c b/src/Startup.c
index aa579f0..09aa87f 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -204,9 +204,11 @@ int HTTP_Shutdown(void)
{
DECLARE_CCTK_PARAMETERS
#ifdef CCTK_PTHREADS
- /* Wait for the polling thread to exit */
+ /* Set the "HTTPD::terminate" parameter to flag termination
+ to the polling thread and wait for it to exit */
if(CCTK_MyProc(NULL) == 0 && use_pthreads && thread_started)
{
+ CCTK_ParameterSet("terminate", CCTK_THORNSTRING, "yes");
pthread_join(polling_thread, NULL);
}
#endif