From ca0200f5d7573053cdbc8c89578fbda9d12a5a01 Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Mon, 3 Jun 2024 22:22:00 -0600 Subject: [PATCH] Throw away any existing uv_default_loop, recreate after fork --- src/App.cpp | 5 +++-- src/App.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App.cpp b/src/App.cpp index 39ec0d62..ff914ff2 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -61,13 +61,14 @@ int xmrig::App::exec() return 2; } - m_signals = std::make_shared(this); - int rc = 0; if (background(rc)) { return rc; } + uv_loop_close(uv_default_loop()); + m_signals = std::make_shared(this); + rc = m_controller->init(); if (rc != 0) { return rc; diff --git a/src/App.h b/src/App.h index 962baead..a89dd119 100644 --- a/src/App.h +++ b/src/App.h @@ -33,6 +33,7 @@ #include +#include namespace xmrig {