Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Sep 19 12:18:15 CEST 2016 on sn-devel-144
#include "lib/util/dlinklist.h"
#include "lib/util/debug.h"
#include "lib/util/blocking.h"
#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"
#include "ctdb_private.h"
#include "ctdb_client.h"
struct tevent_fd *fde;
char **argv;
int i;
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);
log = talloc_zero(mem_ctx, struct ctdb_log_state);
CTDB_NO_MEMORY_NULL(ctdb, log);
argv[i+2] = discard_const(helper_argv[i]);
}
argv[i+2] = discard_const(helper_argv[i]);
}
+ before = timeval_current();
+
*pid = vfork();
if (*pid == 0) {
execv(helper, argv);
*pid = vfork();
if (*pid == 0) {
execv(helper, argv);
+ 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];
ctdb_track_child(ctdb, *pid);
log->pfd = p[0];