mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-9281 - Debian: the Lintian complains about "shlib-calls-exit" in handlersocket.so
MDEV-9278 - Debian: the Lintian complains about "shlib-calls-exit" in ha_spider.so Handlersocket handles errors in a way that it aborts program execution. In most cases it is done via abort(). One exception was host/service resolution failure, which was aborted with exit(). As a workaround replaced this exit() with abort() for symmetry with other error handling.
This commit is contained in:
@@ -17,14 +17,6 @@ namespace dena {
|
||||
|
||||
const int opt_syslog = LOG_ERR | LOG_PID | LOG_CONS;
|
||||
|
||||
void
|
||||
fatal_exit(const std::string& message)
|
||||
{
|
||||
fprintf(stderr, "FATAL_EXIT: %s\n", message.c_str());
|
||||
syslog(opt_syslog, "FATAL_EXIT: %s", message.c_str());
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
void
|
||||
fatal_abort(const std::string& message)
|
||||
{
|
||||
|
@@ -13,7 +13,6 @@
|
||||
|
||||
namespace dena {
|
||||
|
||||
void fatal_exit(const std::string& message);
|
||||
void fatal_abort(const std::string& message);
|
||||
|
||||
};
|
||||
|
@@ -43,7 +43,7 @@ socket_args::set(const config& conf)
|
||||
} else {
|
||||
const char *nd = node.empty() ? 0 : node.c_str();
|
||||
if (resolve(nd, port.c_str()) != 0) {
|
||||
fatal_exit("getaddrinfo failed: " + node + ":" + port);
|
||||
fatal_abort("getaddrinfo failed: " + node + ":" + port);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user