mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-02 01:40:12 +02: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 @@ 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", "");
|
||||
|
||||
@@ -1059,6 +1060,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