r7431: this should fix the bug that mkaplan and I noticed which is that
authorAndrew Tridgell <tridge@samba.org>
Thu, 9 Jun 2005 08:58:12 +0000 (08:58 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:52 +0000 (13:17 -0500)
BENCH-NBENCH sometimes incorrectly reports that it failed.
(This used to be commit 167c29bec6f28e58b5d36325b4285748a47adc58)

source4/torture/nbench/nbench.c

index 8e19461b9559417e94e7a1d2e49fbe2cbaed72c8..9b3c9cdb5ac4120e8bbbcf140d5ee77ce77cbd68 100644 (file)
@@ -198,6 +198,14 @@ BOOL torture_nbench(void)
        printf("Running for %d seconds with load '%s' and warmup %d secs\n", 
               timelimit, loadfile, warmup);
 
+       /* we need to reset SIGCHLD here as the name resolution
+          library may have changed it. We rely on correct signals
+          from childs in the main torture code which reaps
+          children. This is why smbtorture BENCH-NBENCH was sometimes
+          failing */
+       signal(SIGCHLD, SIG_DFL);
+
+
        signal(SIGALRM, nb_alarm);
        alarm(1);
        torture_create_procs(run_netbench, &correct);