On macos, once all panes were closed, the GUI would request that the app stop, but it wouldn't actually exit until a UI event occurred. This was mostly noticeable when running debug builds from another terminal. Calling NSApp::abortModal is sufficient to knock us out of that state.