]> err.no Git - varnish/commitdiff
Check for the expected exit status from varnishd
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 26 Sep 2008 14:06:52 +0000 (14:06 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 26 Sep 2008 14:06:52 +0000 (14:06 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3231 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/vtc_varnish.c

index 5dd253b38b9f7845f1dd91a434aa008f70fbf1aa..6c6f1be170720450c35222372ec1ecb49fc840bd 100644 (file)
@@ -306,6 +306,11 @@ varnish_wait(struct varnish *v)
        AZ(close(v->fds[0]));
        r = wait4(v->pid, &status, 0, NULL);
        vtc_log(v->vl, 2, "R %d Status: %04x", r, status);
+       if (WIFEXITED(status) && WEXITSTATUS(status) == 2)
+               return;
+       vtc_log(v->vl, 0, "Bad exit code: %04x sig %x exit %x core %x",
+           status, WTERMSIG(status), WEXITSTATUS(status),
+           WCOREDUMP(status));
 }
 
 /**********************************************************************