#include "system/wait.h"
#include "db_wrap.h"
#include "lib/tdb/include/tdb.h"
-#include "../include/ctdb_private.h"
+#include "include/ctdb_protocol.h"
+#include "include/ctdb_private.h"
struct lockwait_handle {
key.dptr = talloc_memdup(tmp_ctx, key.dptr, key.dsize);
talloc_set_destructor(h, NULL);
- ctdb_latency(&h->ctdb->statistics.max_lockwait_latency, h->start_time);
+ ctdb_latency(h->ctdb_db, "lockwait", &h->ctdb->statistics.max_lockwait_latency, h->start_time);
h->ctdb->statistics.pending_lockwait_calls--;
/* the handle needs to go away when the context is gone - when
tdb_chainlock_unmark(tdb, key);
kill(child, SIGKILL);
- waitpid(child, NULL, 0);
talloc_free(tmp_ctx);
}
{
h->ctdb->statistics.pending_lockwait_calls--;
kill(h->child, SIGKILL);
- waitpid(h->child, NULL, 0);
return 0;
}
}
close(result->fd[1]);
+ set_close_on_exec(result->fd[0]);
+
+ DEBUG(DEBUG_DEBUG, (__location__ " Created PIPE FD:%d to child lockwait process\n", result->fd[0]));
+
talloc_set_destructor(result, lockwait_destructor);
result->fde = event_add_fd(ctdb_db->ctdb->ev, result, result->fd[0],