[3.0] b4ef285 Elminiate pthread poisoning of manager process.
Tollef Fog Heen
tfheen at varnish-cache.org
Mon Apr 16 10:20:33 CEST 2012
commit b4ef285fc16e7e46c02315ba972d637440ec60b4
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Oct 7 10:03:50 2011 +0000
Elminiate pthread poisoning of manager process.
diff --git a/bin/varnishd/heritage.h b/bin/varnishd/heritage.h
index 99d5747..daf4a1c 100644
--- a/bin/varnishd/heritage.h
+++ b/bin/varnishd/heritage.h
@@ -29,7 +29,6 @@
* This file contains the heritage passed when mgt forks cache
*/
-#include <pthread.h>
#include "vre.h"
struct listen_sock {
diff --git a/bin/varnishd/mgt.h b/bin/varnishd/mgt.h
index 578fcad..41fb525 100644
--- a/bin/varnishd/mgt.h
+++ b/bin/varnishd/mgt.h
@@ -108,3 +108,7 @@ extern unsigned mgt_vcc_err_unref;
#define VSM_Free(a) VSM__Free(a)
#define VSM_Clean() VSM__Clean()
+
+#if defined(PTHREAD_CANCELED) || defined(PTHREAD_MUTEX_DEFAULT)
+#error "Keep pthreads out of in manager process"
+#endif
diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c
index 49e0f81..fd91d08 100644
--- a/bin/varnishd/varnishd.c
+++ b/bin/varnishd/varnishd.c
@@ -653,3 +653,7 @@ main(int argc, char * const *argv)
(void)VPF_Remove(pfh);
exit(exit_status);
}
+
+#if defined(PTHREAD_CANCELED) || defined(PTHREAD_MUTEX_DEFAULT)
+#error "Keep pthreads out of in manager process"
+#endif
More information about the varnish-commit
mailing list