aboutsummaryrefslogtreecommitdiff
path: root/src/common/exec.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-10-02Merge pull request #4479Riccardo Spagni1-88/+0
d5541e44 common: Windows 'spawn' support for tx and block notifications (xiphon)
2018-09-29add --block-notify to monerod and --tx-notify to monero-wallet-{cli,rpc}moneromooo-monero1-0/+88
Those take a command line of the form "A [B]", with A being the name (and optional path, if not in the caller's CWD, but fully qualified path is recommended, avoids possible security issues) to a program, and optional arguments. Any occurence of the two character string "%s" will be replaced by the hash of the block or transaction which triggered the notification. Tokenization is barebones. If you want things like pipes, calls to paths with spaces, etc, then use a script (though exec time will suffer). block-notify is called when a new block is added onto the chain. tx-notify is called when a new transaction happens with the wallet as source and/or destination. It is the notification program's responsibility to determine what to do in those cases. Note that this is asynchronous, so it is very possible that: - the notification programs will be run out of order - several events happen before the notification for the first one A Windows port would be nice if someone wants to make one.