Throw away any existing uv_default_loop, recreate after fork

This commit is contained in:
Tony Butler 2024-06-03 22:22:00 -06:00
parent 5eaa6c152e
commit ca0200f5d7
2 changed files with 4 additions and 2 deletions

View file

@ -61,13 +61,14 @@ int xmrig::App::exec()
return 2; return 2;
} }
m_signals = std::make_shared<Signals>(this);
int rc = 0; int rc = 0;
if (background(rc)) { if (background(rc)) {
return rc; return rc;
} }
uv_loop_close(uv_default_loop());
m_signals = std::make_shared<Signals>(this);
rc = m_controller->init(); rc = m_controller->init();
if (rc != 0) { if (rc != 0) {
return rc; return rc;

View file

@ -33,6 +33,7 @@
#include <memory> #include <memory>
#include <uv.h>
namespace xmrig { namespace xmrig {