mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 18:11:05 +00:00
Fix wrong signal handle.
This commit is contained in:
parent
785df62183
commit
5b88213f61
2 changed files with 9 additions and 5 deletions
10
src/App.cpp
10
src/App.cpp
|
@ -92,7 +92,9 @@ App::App(int argc, char **argv) :
|
|||
|
||||
m_network = new Network(m_options);
|
||||
|
||||
uv_signal_init(uv_default_loop(), &m_signal);
|
||||
uv_signal_init(uv_default_loop(), &m_sigHUP);
|
||||
uv_signal_init(uv_default_loop(), &m_sigINT);
|
||||
uv_signal_init(uv_default_loop(), &m_sigTERM);
|
||||
}
|
||||
|
||||
|
||||
|
@ -114,9 +116,9 @@ int App::exec()
|
|||
return 0;
|
||||
}
|
||||
|
||||
uv_signal_start(&m_signal, App::onSignal, SIGHUP);
|
||||
uv_signal_start(&m_signal, App::onSignal, SIGTERM);
|
||||
uv_signal_start(&m_signal, App::onSignal, SIGINT);
|
||||
uv_signal_start(&m_sigHUP, App::onSignal, SIGHUP);
|
||||
uv_signal_start(&m_sigINT, App::onSignal, SIGINT);
|
||||
uv_signal_start(&m_sigTERM, App::onSignal, SIGTERM);
|
||||
|
||||
background();
|
||||
|
||||
|
|
|
@ -60,7 +60,9 @@ private:
|
|||
Httpd *m_httpd;
|
||||
Network *m_network;
|
||||
Options *m_options;
|
||||
uv_signal_t m_signal;
|
||||
uv_signal_t m_sigHUP;
|
||||
uv_signal_t m_sigINT;
|
||||
uv_signal_t m_sigTERM;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue