I took me some, but I think I have an answer. I went trough the source code and found the runCommand()
function that actually starts the command provided by notify options (it is called mostly from main.cpp
and the code runs in a separate thread).
From util.cpp
void runCommand(std::string strCommand)
{
int nErr = ::system(strCommand.c_str());
if (nErr)
LogPrintf("runCommand error: system(%s) returned %d\n", strCommand, nErr);
}
It uses the standard C library method system()
, which is probably giving you the flashing window. Normally one would use CreateProcess()
(or similar) to prevent the flash effect and have much more control over the spawned process (I don't know why the developers chose system()
here, but I guess it was just easier). I believe the behavior of the system()
call is system dependent.
Also, when you say bitcoind
, you mean the CLI interface of bitcoin, right? Is there a bitcoind
console window running? As for a solution, you could edit the source code to use CreateProcess()
with the DETACHED_PROCESS
flag, that would do the trick.