Handle startup errors without calling abort()

This commit is contained in:
SChernykh
2022-05-23 09:37:11 +02:00
parent 1cf13e142a
commit b191962d32
3 changed files with 15 additions and 10 deletions

View File

@@ -85,10 +85,15 @@ int main(int argc, char* argv[])
memory_tracking_start();
p2pool::init_crypto_cache();
{
try {
p2pool::p2pool pool(argc, argv);
result = pool.run();
}
catch (...) {
result = 1;
}
p2pool::destroy_crypto_cache();
memory_tracking_stop();