[master] 5981c35a6 mgt: Remove vext_cache only when necessary

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Dec 6 13:15:09 UTC 2022


commit 5981c35a6e3b5b09dc169aab8ae76ed45710cef6
Author: Walid Boudebouda <walid.boudebouda at gmail.com>
Date:   Thu Dec 1 17:37:27 2022 +0100

    mgt: Remove vext_cache only when necessary
    
    Refs #3874

diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index 019da8d02..2d77b7d63 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -286,9 +286,11 @@ mgt_Cflag_atexit(void)
 	/* Only master process */
 	if (getpid() != heritage.mgt_pid)
 		return;
-	vext_cleanup(1);
+	if (arg_list_count("E")) {
+		vext_cleanup(1);
+		VJ_rmdir("vext_cache");
+	}
 	VJ_rmdir("vmod_cache");
-	VJ_rmdir("vext_cache");
 	(void)chdir("/");
 	VJ_rmdir(workdir);
 }


More information about the varnish-commit mailing list