mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-27 13:15:52 +01:00
Print log before dumping stack trace to avoid log overwriting by other threads.
This commit is contained in:
parent
fc1de34374
commit
4942b4346b
@ -103,6 +103,7 @@ static void dump_stacktrace_signal_handler(int sig) {
|
|||||||
|
|
||||||
static void fail_signal_handler(int sig) {
|
static void fail_signal_handler(int sig) {
|
||||||
has_failed = true;
|
has_failed = true;
|
||||||
|
print_log();
|
||||||
{
|
{
|
||||||
td::LogGuard log_guard;
|
td::LogGuard log_guard;
|
||||||
td::signal_safe_write_signal_number(sig);
|
td::signal_safe_write_signal_number(sig);
|
||||||
@ -110,7 +111,6 @@ static void fail_signal_handler(int sig) {
|
|||||||
options.use_gdb = true;
|
options.use_gdb = true;
|
||||||
td::Stacktrace::print_to_stderr(options);
|
td::Stacktrace::print_to_stderr(options);
|
||||||
}
|
}
|
||||||
print_log();
|
|
||||||
_Exit(EXIT_FAILURE);
|
_Exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user