regression tests: Properly handle adnshost et al exit status
[adns] / regress / hcommon.c.m4
index 760ca0c..62b2d03 100644 (file)
@@ -311,7 +311,7 @@ void *Hrealloc(void *op, size_t nsz) {
   return np;
 }
 
-void Hexit(int rv) {
+void Texit(int rv) {
   struct malloced *loopnode;
 
   Tshutdown();
@@ -327,6 +327,13 @@ void Hexit(int rv) {
   exit(rv);
 }
 
+void Hexit(int rv) {
+  vb.used= 0;
+  Tvbf("exit %d", rv);
+  Q_vb();
+  Texit(0);
+}
+
 pid_t Hgetpid(void) {
   return 2264; /* just some number */
 }