Date: Tue Dec 15 15:53:30 2009 +1030
eventscript: hack to avoid overloading valgrind
Now we fork one child per script, when running under valgrind the
load
gets quite high. This is because valgrind does a lot of work after
exit,
and we don't wait for the children to finish; we start the next one
when
the child reports status via the pipe.
This fix is ugly, but simple.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
state->cb_status = 0;
}
+ /* valgrind gets overloaded if we run next script as it's still doing
+ * post-execution analysis, so kill finished child here. */
+ kill(state->child, SIGKILL);
state->child = 0;
/* Aborted or finished all scripts? We're done. */