mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-23 22:19:39 +01:00
Merge #15457: Check std::system for -[alert|block|wallet]notify
f874e14cd3[build]: check std::system for -[alert|block|wallet]notify (Sjors Provoost)cc3ad56ff2[build] MSVC: set HAVE_SYSTEM for desktop apps (Sjors Provoost)c1c91bb78d[build] detect std::system or ::wsystem (Sjors Provoost) Pull request description: Platforms such as iOs and Universal Windows Platform do not support launching a process through system(). ACKs for top commit: laanwj: code review ACKf874e14cd3Tree-SHA512: 16bb4a8fa1896046ccb22a46c8985e1aa45f5b11ecf5539eb2299e9a58f1a5b085c0c12cb6939c7493d93abce7e84fadcbfc73374c887db63da6d00c08aa476d
This commit is contained in:
@@ -1050,6 +1050,7 @@ static CBlockIndex *pindexBestForkTip = nullptr, *pindexBestForkBase = nullptr;
|
||||
static void AlertNotify(const std::string& strMessage)
|
||||
{
|
||||
uiInterface.NotifyAlertChanged();
|
||||
#if defined(HAVE_SYSTEM)
|
||||
std::string strCmd = gArgs.GetArg("-alertnotify", "");
|
||||
if (strCmd.empty()) return;
|
||||
|
||||
@@ -1063,6 +1064,7 @@ static void AlertNotify(const std::string& strMessage)
|
||||
|
||||
std::thread t(runCommand, strCmd);
|
||||
t.detach(); // thread runs free
|
||||
#endif
|
||||
}
|
||||
|
||||
static void CheckForkWarningConditions() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
||||
|
||||
Reference in New Issue
Block a user