Renaming the main thread (e.g., the one the program spawns with) causes the name of the daemon in utilities such as “top” to show as “b-init” instead of bitcoind. This is surprising, as it doesn’t show the other thread names (by default), you’d expect it to show program names.
This doesn’t only affect top: killall does no longer recognize the program name
0$ killall bitcoind
1bitcoind: no process found
2$ killall b-init
3(no output, succesful)
In contrast to , initialization happens in the main thread in bitcoin-qt
, which doesn’t suffer from this problem because it has a separate init threadbitcoind
, and it’s renamed due to util::ThreadRename("init");
in AppInit
. If we want to name the init thread, this should only be done in bitcoin-qt
.
(not sure when this was introduced, but #16984 made the issue more visible because ther’s no bitcoin in the name anymore)