#include "lib/util/dlinklist.h"
#include "lib/util/debug.h"
#include "lib/util/blocking.h"
+#include "lib/util/time.h"
#include "ctdb_private.h"
#include "ctdb_client.h"
struct tevent_fd *fde;
char **argv;
int i;
+ struct timeval before;
+ double delta_t;
log = talloc_zero(mem_ctx, struct ctdb_log_state);
CTDB_NO_MEMORY_NULL(ctdb, log);
argv[i+2] = discard_const(helper_argv[i]);
}
+ before = timeval_current();
+
*pid = vfork();
if (*pid == 0) {
execv(helper, argv);
goto free_log;
}
+ delta_t = timeval_elapsed(&before);
+ if (delta_t > 3.0) {
+ DEBUG(DEBUG_WARNING, ("vfork() took %lf seconds\n", delta_t));
+ }
+
ctdb_track_child(ctdb, *pid);
log->pfd = p[0];