Fix for crash on -B / --background option - version 2.

This commit is contained in:
Haifa Bogdan Adnan 2019-09-02 14:28:31 +03:00
parent 206f6784fd
commit 4b24824f96
2 changed files with 2 additions and 7 deletions

View file

@ -88,11 +88,11 @@ int xmrig::App::exec()
m_signals = new Signals(this); m_signals = new Signals(this);
background();
// load hasher modules // load hasher modules
Hasher::loadHashers(m_appFileName); Hasher::loadHashers(m_appFileName);
background();
Summary::print(m_controller); Summary::print(m_controller);
if (m_controller->config()->isDryRun()) { if (m_controller->config()->isDryRun()) {

View file

@ -57,9 +57,4 @@ void xmrig::App::background()
if (i < 0) { if (i < 0) {
LOG_ERR("setsid() failed (errno = %d)", errno); LOG_ERR("setsid() failed (errno = %d)", errno);
} }
i = chdir("/");
if (i < 0) {
LOG_ERR("chdir() failed (errno = %d)", errno);
}
} }