src/vs/workbench/contrib/terminal/browser/terminalService.ts/TerminalService/safeDisposeTerminal
class TerminalService:	async safeDisposeTerminal(instance: ITerminalInstance): Promise<void> {
		if (this.configHelper.config.confirmOnExit) {
			const notConfirmed = await this._showTerminalCloseConfirmation(true);
			if (notConfirmed) {
				return;
			}
		}
		instance.dispose();
	}