bitcoin/bitcoin — pull request #633 by laanwj (2011-11-12 13:07:39+00:00)
Title: RPC: do not launch Shutdown in a new thread in case we are running the UI

This leads to the bitcoin core being shut down while the UI is accessing it, and generally results in a segmentation fault or crash. In case it is desirable to make it possible to shutdown the GUI from its RPC server, we'll need to implement a signal for it. For the mean time, this is a safe stopgap.

Reproducing the bug:

bitcoin-qt -testnet -server -datadir=<new directory>

Output:

Warning: To use the "-server" option, you must set rpcpassword=
in the configuration file: /tmp/test/testnet/bitcoin.conf
If the file does not exist, create it with owner-readable-only file permissions.
Segmentation fault

Also changes the Warning to an Error (as it is kind of fatal, terminating the rpc thread).