Tor launcher shuts down poorly when its Tor is a relay
Edit your TBB's torrc file to include "ORPort 9001". Start TBB, let it bootstrap and produce a browser window.
Then close Tor Browser. Your stdout will say:
Dec 20 01:30:01.000 [notice] Owning controller connection has closed -- shutting down.
Dec 20 01:30:01.000 [notice] Interrupt: we have stopped accepting new connections, and will shut down in 30 seconds. Interrupt again to exit now.
and Tor Browser Bundle will exit:
Tor Browser exited cleanly.
Then thirty seconds later, we get
Dec 20 01:30:31.000 [notice] Clean shutdown finished. Exiting.
If you start your TBB again during this 30 second period, the old Tor process is still going, so your new Tor fails to start and things go bad.
What's going on here is due to Tor's ShutdownWaitLength default of 30 seconds.
Vidalia once solved this by popping up a window "you are a relay, do you want to close immediately or wait and close nicely"?
Maybe another answer is that Tor should close immediately, even if it's a relay, if it's closing because "Owning controller connection has closed".