summaryrefslogtreecommitdiffstats
path: root/ctdb/common/ctdb_util.c
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-06-30 17:42:11 +1000
committerAmitay Isaacs <amitay@gmail.com>2013-07-05 15:52:33 +1000
commitdbd1759eae8f701ef3fede0ff5f5e3f61e995c38 (patch)
tree961756ea9e0396d7aabaca846c91e4e01279415b /ctdb/common/ctdb_util.c
parent4e07c6c433d158686e83dfcc64eb80a9e3ec0a1d (diff)
downloadsamba-dbd1759eae8f701ef3fede0ff5f5e3f61e995c38.tar.gz
samba-dbd1759eae8f701ef3fede0ff5f5e3f61e995c38.tar.xz
samba-dbd1759eae8f701ef3fede0ff5f5e3f61e995c38.zip
util: New function ctdb_die()
This is like ctdb_fatal() but exits cleanly without dumping core or generating a backtrace. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c0a9456692c88a7a5542cd893d8f326524d3f94e)
Diffstat (limited to 'ctdb/common/ctdb_util.c')
-rw-r--r--ctdb/common/ctdb_util.c9
1 files changed, 9 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