Starting with txindex option produces a bug continually printing "y".

```
sudo apt-add-repository ppa:bitcoin/bitcoin
sudo apt-get update
bitcoind -daemon -txindex=1 -server=1 &
root@btc:~# Bitcoin server starting
: You need to rebuild the database using -reindex to change -txindex.

Do you want to rebuild the block database now?
yes
y
y
y
y
y
```

{
    InterruptHTTPServer();
    InterruptHTTPRPC();
    InterruptRPC();
    InterruptREST();
    InterruptTorControl();
    threadGroup.interrupt_all();
}
void Shutdown()
{
    LogPrintf("%s: In progress...\n", __func__);
    static CCriticalSection cs_Shutdown;
    TRY_LOCK(cs_Shutdown, lockShutdown);
    if (!lockShutdown)
        return;
    
    
    
    
    RenameThread("bitcoin-shutoff");
    mempool.AddTransactionsUpdated(1);
    StopHTTPRPC();
    StopREST();
    StopRPC();
    StopHTTPServer();
#ifdef ENABLE_WALLET
    if (pwalletMain)