[master] 95dca26 output the actual exit status and optional signal

Nils Goroll nils.goroll at uplex.de
Tue Apr 14 18:55:17 CEST 2015


commit 95dca2632c30adff51fb28ffb6159c5373404125
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Apr 14 18:21:42 2015 +0200

    output the actual exit status and optional signal

diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index 756c616..a956052 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -452,7 +452,9 @@ cmd_err_shell(CMD_ARGS)
 			VSB_putc(vsb, c);
 	} while (c != EOF);
 	r = pclose(fp);
-	vtc_log(vl, 4, "Status = %d", r);
+	vtc_log(vl, 4, "Status = %d", WEXITSTATUS(r));
+	if (WIFSIGNALED(r))
+		vtc_log(vl, 4, "Signal = %d", WTERMSIG(r));
 	AZ(VSB_finish(vsb));
 	vtc_dump(vl, 4, "stdout", VSB_data(vsb), VSB_len(vsb));
 	if (strstr(VSB_data(vsb), av[1]) == NULL)



More information about the varnish-commit mailing list