[master] 6207b70 Fix a self-recursion during cleanup

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


commit 6207b703bd581a321950f996f324daab55d9e3ab
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sat Mar 4 21:15:58 2017 +0000

    Fix a self-recursion during cleanup

diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index 544a63c..f22e5cc 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -107,11 +107,11 @@ varnish_ask_cli(const struct varnish *v, const char *cmd, char **repl)
 	if (cmd != NULL) {
 		vtc_dump(v->vl, 4, "CLI TX", cmd, -1);
 		i = write(v->cli_fd, cmd, strlen(cmd));
-		if (i != strlen(cmd))
+		if (i != strlen(cmd) && !vtc_stop)
 			vtc_fatal(v->vl, "CLI write failed (%s) = %u %s",
 			    cmd, errno, strerror(errno));
 		i = write(v->cli_fd, "\n", 1);
-		if (i != 1)
+		if (i != 1 && !vtc_stop)
 			vtc_fatal(v->vl, "CLI write failed (%s) = %u %s",
 			    cmd, errno, strerror(errno));
 	}



More information about the varnish-commit mailing list