mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-26 14:02:53 -05:00
Compare commits
6 Commits
v6.21.3
...
0f55fa18a9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f55fa18a9 | ||
|
|
a7be8cb80c | ||
|
|
2ce16df423 | ||
|
|
5eaa6c152e | ||
|
|
6972f727c1 | ||
|
|
5ac6d438fa |
@@ -6,8 +6,8 @@
|
|||||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||||
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
|
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
|
||||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
* Copyright 2018-2024 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,7 +23,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <uv.h>
|
#include <uv.h>
|
||||||
|
|
||||||
@@ -61,13 +60,13 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
* Copyright 2018-2024 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
@@ -53,16 +52,9 @@ bool xmrig::App::background(int &rc)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
i = setsid();
|
if (setsid() < 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,6 +169,12 @@ bool xmrig::Platform::isOnBatteryPower()
|
|||||||
return (status == "Discharging");
|
return (status == "Discharging");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
std::ifstream f("/sys/class/power_supply/macsmc-battery/status");
|
||||||
|
if (f.is_open()) {
|
||||||
|
std::string status;
|
||||||
|
f >> status;
|
||||||
|
return (status == "Discharging");
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#define APP_ID "xmrig"
|
#define APP_ID "xmrig"
|
||||||
#define APP_NAME "XMRig"
|
#define APP_NAME "XMRig"
|
||||||
#define APP_DESC "XMRig miner"
|
#define APP_DESC "XMRig miner"
|
||||||
#define APP_VERSION "6.21.3"
|
#define APP_VERSION "6.21.4-dev"
|
||||||
#define APP_DOMAIN "xmrig.com"
|
#define APP_DOMAIN "xmrig.com"
|
||||||
#define APP_SITE "www.xmrig.com"
|
#define APP_SITE "www.xmrig.com"
|
||||||
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"
|
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#define APP_VER_MAJOR 6
|
#define APP_VER_MAJOR 6
|
||||||
#define APP_VER_MINOR 21
|
#define APP_VER_MINOR 21
|
||||||
#define APP_VER_PATCH 3
|
#define APP_VER_PATCH 4
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# if (_MSC_VER >= 1930)
|
# if (_MSC_VER >= 1930)
|
||||||
|
|||||||
Reference in New Issue
Block a user