diff options
-rw-r--r-- | ctdb/common/ctdb_util.c | 9 | ||||
-rw-r--r-- | ctdb/include/ctdb_private.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c index d2bce36af2d..a2da3bccd54 100644 --- a/ctdb/common/ctdb_util.c +++ b/ctdb/common/ctdb_util.c @@ -59,6 +59,15 @@ void ctdb_fatal(struct ctdb_context *ctdb, const char *msg) abort(); } +/* + like ctdb_fatal() but a core/backtrace would not be useful +*/ +void ctdb_die(struct ctdb_context *ctdb, const char *msg) +{ + DEBUG(DEBUG_ALERT,("ctdb exiting with error: %s\n", msg)); + exit(1); +} + /* Invoke an external program to do some sort of tracing on the CTDB * process. This might block for a little while. The external * program is specified by the environment variable diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 05109acb6d2..1939f07cceb 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -725,6 +725,7 @@ struct ctdb_fetch_handle { /* internal prototypes */ void ctdb_set_error(struct ctdb_context *ctdb, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); void ctdb_fatal(struct ctdb_context *ctdb, const char *msg); +void ctdb_die(struct ctdb_context *ctdb, const char *msg); void ctdb_external_trace(void); bool ctdb_same_address(struct ctdb_address *a1, struct ctdb_address *a2); int ctdb_parse_address(struct ctdb_context *ctdb, |