src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts/TerminalProcessManager/dispose
class TerminalProcessManager:	override dispose(immediate: boolean = false): void {
		this._isDisposed = true;
		if (this._process) {
			// If the process was still connected this dispose came from
			// within VS Code, not the process, so mark the process as
			// killed by the user.
			this._setProcessState(ProcessState.KilledByUser);
			this._process.shutdown(immediate);
			this._process = null;
		}
		super.dispose();
	}