return -1;
}
-/*
- delete the socket on exit - called on destruction of autofree context
- */
-static int unlink_destructor(const char *name)
-{
- unlink(name);
- return 0;
-}
-
static void sig_child_handler(struct event_context *ev,
struct signal_event *se, int signum, int count,
void *dont_care,
/* ensure the socket is deleted on exit of the daemon */
domain_socket_name = talloc_strdup(talloc_autofree_context(), ctdb->daemon.name);
- talloc_set_destructor(domain_socket_name, unlink_destructor);
+ if (domain_socket_name == NULL) {
+ DEBUG(DEBUG_ALERT,(__location__ " talloc_strdup failed.\n"));
+ exit(12);
+ }
ctdb->ev = event_context_init(NULL);