struct trbt_tree *child_processes;
/* Used for locking record/db/alldb */
+ const char *lock_helper;
struct lock_context *lock_current;
struct lock_context *lock_pending;
};
struct lock_context *lock_ctx;
int ret;
TALLOC_CTX *tmp_ctx;
- static char prog[PATH_MAX+1] = "";
char **args = NULL;
- if (!ctdb_set_helper("lock helper",
- prog, sizeof(prog),
- "CTDB_LOCK_HELPER",
- CTDB_HELPER_BINDIR, "ctdb_lock_helper")) {
- ctdb_die(ctdb, __location__
- " Unable to set lock helper\n");
- }
-
/* Find a lock context with requests */
lock_ctx = ctdb_find_lock_context(ctdb);
if (lock_ctx == NULL) {
lock_ctx->child = ctdb_vfork_exec(lock_ctx,
ctdb,
- prog,
+ ctdb->lock_helper,
talloc_array_length(args),
(const char *const *)args);
if (lock_ctx->child == -1) {
return NULL;
}
+ ctdb->lock_helper = path_helperdir_append(ctdb, "ctdb_lock_helper");
+ if (ctdb->lock_helper == NULL) {
+ DBG_ERR("Memory allocation error\n");
+ talloc_free(ctdb);
+ return NULL;
+ }
+
ctdbd_pidfile = path_pidfile(ctdb, "ctdbd");
if (ctdbd_pidfile == NULL) {
DBG_ERR("Memory allocation error\n");
if ! $CTDB_TESTS_ARE_INSTALLED; then
hdir="$CTDB_SCRIPTS_HELPER_BINDIR"
- export CTDB_LOCK_HELPER="${hdir}/ctdb_lock_helper"
export CTDB_CLUSTER_MUTEX_HELPER="${hdir}/ctdb_mutex_fcntl_helper"
fi