am e3c7b519: Merge "Don\'t corrupt the thread list if the main thread exits."

* commit 'e3c7b5192e65eeb0bd90bf884d3435ed9adfad0e':
  Don't corrupt the thread list if the main thread exits.