Merge "Don't call exit() with threads running"