]> err.no Git - varnish/commitdiff
Catch two other return cases from smf_init() so we don't close
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 24 Jun 2008 10:15:17 +0000 (10:15 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 24 Jun 2008 10:15:17 +0000 (10:15 +0000)
the storage file by accident.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2786 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/storage_file.c

index c6d34c53371e40c3ba1f0f32e2fd4a54944cc83e..2df21fd8dca2ca9913303fa00c26dc96b89afeef 100644 (file)
@@ -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;
        }