From a175314c3e5827eb193872241446f2f8f5c9d33c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:07:14 +0200 Subject: Adding upstream version 1:10.5.12. Signed-off-by: Daniel Baumann --- plugin/handler_socket/libhsclient/fatal.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 plugin/handler_socket/libhsclient/fatal.cpp (limited to 'plugin/handler_socket/libhsclient/fatal.cpp') diff --git a/plugin/handler_socket/libhsclient/fatal.cpp b/plugin/handler_socket/libhsclient/fatal.cpp new file mode 100644 index 00000000..8e109cf1 --- /dev/null +++ b/plugin/handler_socket/libhsclient/fatal.cpp @@ -0,0 +1,29 @@ + +// vim:sw=2:ai + +/* + * Copyright (C) 2010 DeNA Co.,Ltd.. All rights reserved. + * See COPYRIGHT.txt for details. + */ + +#include +#include +#include +#include + +#include "fatal.hpp" + +namespace dena { + +const int opt_syslog = LOG_ERR | LOG_PID | LOG_CONS; + +void +fatal_abort(const std::string& message) +{ + fprintf(stderr, "FATAL_COREDUMP: %s\n", message.c_str()); + syslog(opt_syslog, "FATAL_COREDUMP: %s", message.c_str()); + abort(); +} + +}; + -- cgit v1.2.3