[master] dfe4b5e Create vmod_cache subdirectory in master rather than child

Poul-Henning Kamp phk at FreeBSD.org
Sun Mar 5 00:55:05 CET 2017


commit dfe4b5e66685996471bf435d926c448429b6cff6
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sat Mar 4 22:46:50 2017 +0000

    Create vmod_cache subdirectory in master rather than child

diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index f6fc0c3..8a6acf7 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -292,12 +292,6 @@ mgt_launch_child(struct cli *cli)
 
 	child_state = CH_STARTING;
 
-	if (VJ_make_vcldir("vmod_cache")) {
-		VCLI_Out(cli, "Could not create vmod cache dir");
-		VCLI_SetResult(cli, CLIS_UNKNOWN);
-		return;
-	}
-
 	/* Open pipe for mgr->child CLI */
 	AZ(pipe(cp));
 	heritage.cli_in = cp[0];
diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index ae81022..9056a9d 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -771,6 +771,12 @@ main(int argc, char * const *argv)
 		ARGV_ERR("Cannot create working directory (%s): %s\n",
 		    dirname, strerror(errno));
 
+	if (VJ_make_vcldir("vmod_cache")) {
+		ARGV_ERR(
+		    "Cannot create vmod directory (%s/vmod_cache): %s\n",
+		    dirname, strerror(errno));
+	}
+
 	VJ_master(JAIL_MASTER_FILE);
 	if (P_arg && (pfh = VPF_Open(P_arg, 0644, NULL)) == NULL)
 		ARGV_ERR("Could not open pid/lock (-P) file (%s): %s\n",



More information about the varnish-commit mailing list