Testsuite: better restriction of parallel 2-stage-queue-runners
[exim.git] / src / src / queue.c
index 8c9f5cb2ac37e49c0dfba3c0973802b1aa08e93c..53dc6e026c6ce6d4ceb9b364fa71c99206d83738 100644 (file)
@@ -483,10 +483,11 @@ for (int i = queue_run_in_order ? -1 : 0;
       int i;
       if (qpid[f.running_in_test_harness ? 0 : nelem(qpid) - 1])
        {
-       DEBUG(D_queue_run) debug_printf("q2stage waiting for child\n");
+       DEBUG(D_queue_run) debug_printf("q2stage waiting for child %d\n", (int)qpid[0]);
        waitpid(qpid[0], NULL, 0);
        DEBUG(D_queue_run) debug_printf("q2stage reaped child %d\n", (int)qpid[0]);
-       for (i = 0; i < nelem(qpid) - 1; i++) qpid[i] = qpid[i+1];
+       if (f.running_in_test_harness) i = 0;
+       else for (i = 0; i < nelem(qpid) - 1; i++) qpid[i] = qpid[i+1];
        qpid[i] = 0;
        }
       else