There is now (#3283) an option to wait for the daemon to start. It would also be useful to be able to wait for the daemon to stop.
-
laanwj commented at 10:36 AM on December 3, 2013: member
-
laanwj commented at 6:22 PM on September 23, 2015: member
Closing this, I don't think this can be achieved in bitcoin-cli, through RPC.
I still think this functionality is seful; e.g. I have a deploy script for a few nodes that stops them, uploads a new version of bitcoind, and starts them again. But that needs to be sure that the daemon is no longer running. But as this is local-only I'm going to use an external script that just waits for the pid to die, e.g.:
pid_t pid = ReadPidFile(); while(kill(pid, 0) == 0) usleep(250000); - laanwj closed this on Sep 23, 2015
- Bushstar referenced this in commit 4c01ca4573 on Apr 8, 2020
- laanwj reopened this on Mar 1, 2021
- laanwj removed the label Refactoring on Mar 1, 2021
- laanwj added the label RPC/REST/ZMQ on Mar 1, 2021
- laanwj added the label Utils/log/libs on Mar 1, 2021
-
laanwj commented at 5:36 PM on March 1, 2021: member
Reopening this. I still often would like this functionality.
At least on UNIX it can be implemented by waiting for the PID in the PID file to exit. Alternatively, for the data directory lock file to be unlocked? (Neither of these work cross-host, but I am fine with that limitation if mentioned explicitly)
(one case where it is useful is for restarting
bitcoindwhen it's running in the backgound, need to be sure what it's quit entirely) - laanwj added the label Feature on Mar 1, 2021
- laanwj closed this on Apr 14, 2022
- DrahtBot locked this on Apr 14, 2023