From: phk Date: Tue, 24 Jun 2008 10:15:17 +0000 (+0000) Subject: Catch two other return cases from smf_init() so we don't close X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=053ba02a2abe1f3e90f752d7c3700e64adedbfe4;p=varnish Catch two other return cases from smf_init() so we don't close the storage file by accident. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2786 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/storage_file.c b/varnish-cache/bin/varnishd/storage_file.c index c6d34c53..2df21fd8 100644 --- a/varnish-cache/bin/varnishd/storage_file.c +++ b/varnish-cache/bin/varnishd/storage_file.c @@ -274,6 +274,7 @@ smf_init(struct stevedore *parent, const char *spec) 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 @@ smf_init(struct stevedore *parent, const char *spec) exit (2); } sc->filename = p; + mgt_child_inherit(sc->fd, "storage_file"); smf_initfile(sc, size, 0); return; }