There are a number of areas where bitcoin{d,-qt} is slow in dealing with shutdown requests.
- getaddrinfo (for the -externalip settings) can take over 25s to return when the DNS entry cannot be found. This causes init.cpp to wait until this has finished, even if shutdown is requested during.
- ActivateBestChain() currently uses ConnectBlock() which can take >30s per block, and does not respond to shutdown requests while looping through the txs in a block.
- LoadBlockIndex() although only run at start-up, there are still cases where we may want to shutdown bitcoin (e.g. power-failure) so again it could be more responsive here.