Added death handler
This commit is contained in:
parent
7316fe72eb
commit
5a2ee4d91b
@ -420,6 +420,7 @@ class MultiImplPool {
|
||||
std::shared_ptr<MultiImpl> get() {
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
if (impls_.empty()) {
|
||||
Debug::DeathHandler dh;
|
||||
init_openssl_threads();
|
||||
|
||||
impls_.resize(clamp(thread::hardware_concurrency(), 8u, 1000u) * 5 / 4);
|
||||
|
@ -4343,6 +4343,7 @@ static void on_fatal_error(const char *error) {
|
||||
}
|
||||
|
||||
void main(int argc, char **argv) {
|
||||
Debug::DeathHandler dh;
|
||||
ignore_signal(SignalType::HangUp).ensure();
|
||||
ignore_signal(SignalType::Pipe).ensure();
|
||||
set_signal_handler(SignalType::Error, fail_signal).ensure();
|
||||
|
@ -10,12 +10,14 @@
|
||||
#include "td/utils/OptionParser.h"
|
||||
#include "td/utils/Slice.h"
|
||||
#include "td/utils/tests.h"
|
||||
#include "death_handler.h"
|
||||
|
||||
#if TD_EMSCRIPTEN
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
Debug::DeathHandler dh;
|
||||
td::init_openssl_threads();
|
||||
|
||||
td::TestsRunner &runner = td::TestsRunner::get_default();
|
||||
|
Loading…
Reference in New Issue
Block a user