r2786 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Tue Jun 24 12:15:17 CEST 2008


Author: phk
Date: 2008-06-24 12:15:17 +0200 (Tue, 24 Jun 2008)
New Revision: 2786

Modified:
   trunk/varnish-cache/bin/varnishd/storage_file.c
Log:
Catch two other return cases from smf_init() so we don't close
the storage file by accident.



Modified: trunk/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_file.c	2008-06-24 10:04:48 UTC (rev 2785)
+++ trunk/varnish-cache/bin/varnishd/storage_file.c	2008-06-24 10:15:17 UTC (rev 2786)
@@ -274,6 +274,7 @@
 	sc->fd = open(p, O_RDWR | O_CREAT | O_EXCL, 0600);
 	if (sc->fd >= 0) {
 		sc->filename = p;
+		mgt_child_inherit(sc->fd, "storage_file");
 		smf_initfile(sc, size, 1);
 		return;
 	}
@@ -310,6 +311,7 @@
 			exit (2);
 		}
 		sc->filename = p;
+		mgt_child_inherit(sc->fd, "storage_file");
 		smf_initfile(sc, size, 0);
 		return;
 	}




More information about the varnish-commit mailing list