mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
[build]: check std::system for -[alert|block|wallet]notify
Platforms such as iOs do not support launching a process through system().
This commit is contained in:
parent
cc3ad56ff2
commit
f874e14cd3
7 changed files with 19 additions and 1 deletions
|
|
@ -1054,6 +1054,7 @@ 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;
|
||||
|
||||
|
|
@ -1067,6 +1068,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue