[master] c327e76 Elminiate pthread poisoning of manager process.

Poul-Henning Kamp phk at varnish-cache.org
Fri Oct 7 12:04:03 CEST 2011


commit c327e7651c2b4b24730d7b8f8ec2e10115d50455
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 7aebf11..bb684b3 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 24293c2..a21ca1c 100644
--- a/bin/varnishd/mgt.h
+++ b/bin/varnishd/mgt.h
@@ -107,3 +107,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