r271 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Jun 30 11:14:51 CEST 2006


Author: phk
Date: 2006-06-30 11:14:51 +0200 (Fri, 30 Jun 2006)
New Revision: 271

Modified:
   trunk/varnish-cache/bin/varnishd/cache_vcl.c
Log:
Delete compiled VCL file after we tried to load it.


Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vcl.c	2006-06-29 19:19:18 UTC (rev 270)
+++ trunk/varnish-cache/bin/varnishd/cache_vcl.c	2006-06-30 09:14:51 UTC (rev 271)
@@ -3,6 +3,7 @@
  */
 
 #include <stdio.h>
+#include <unistd.h>
 #include <string.h>
 #include <assert.h>
 #include <stdlib.h>
@@ -69,6 +70,7 @@
 	assert(vcl != NULL);
 
 	vcl->dlh = dlopen(fn, RTLD_NOW | RTLD_LOCAL);
+	unlink(fn);
 	if (vcl->dlh == NULL) {
 		fprintf(stderr, "dlopen(%s): %s\n", fn, dlerror());
 		free(vcl);




More information about the varnish-commit mailing list