mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-02 03:46:01 +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:
@@ -1008,6 +1008,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose)
|
||||
// Notify UI of new or updated transaction
|
||||
NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED);
|
||||
|
||||
#if defined(HAVE_SYSTEM)
|
||||
// notify an external script when a wallet transaction comes in or is updated
|
||||
std::string strCmd = gArgs.GetArg("-walletnotify", "");
|
||||
|
||||
@@ -1017,6 +1018,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose)
|
||||
std::thread t(runCommand, strCmd);
|
||||
t.detach(); // thread runs free
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user