mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
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)
This commit is contained in:
parent
4e07c6c433
commit
dbd1759eae
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user