src/vs/workbench/contrib/terminal/browser/terminalInstance.ts/TerminalInstance/_createProcessManager
class TerminalInstance:	protected _createProcessManager(): void {
		this._processManager = this._instantiationService.createInstance(TerminalProcessManager, this._instanceId, this._configHelper);
		this._processManager.onProcessReady(() => {
			this._onProcessIdReady.fire(this);
			// Set the initial name based on the _resolved_ shell launch config, this will also
			// ensure the resolved icon gets shown
			if (this._shellLaunchConfig.name) {
				this.setTitle(this._shellLaunchConfig.name, TitleEventSource.Api);
			} else {
				// Only listen for process title changes when a name is not provided
				if (this._configHelper.config.titleMode === 'sequence') {
					// Set the title to the first event if the sequence hasn't set it yet
					Event.once(this._processManager.onProcessTitle)(e => {
						if (!this._title) {
							this.setTitle(e, TitleEventSource.Sequence);
						}
					});
					// Listen to xterm.js' sequence title change event, trigger this async to ensure
					// _xtermReadyPromise is ready constructed since this is called from the ctor
					setTimeout(() => {
						this._xtermReadyPromise.then(xterm => {
							this._messageTitleDisposable = xterm.onTitleChange(e => this._onTitleChange(e));
						});
					});
				} else {
					this.setTitle(this._shellLaunchConfig.executable, TitleEventSource.Process);
					this._messageTitleDisposable = this._processManager.onProcessTitle(title => this.setTitle(title ? title : '', TitleEventSource.Process));
				}
			}
		});
		this._processManager.onProcessExit(exitCode => this._onProcessExit(exitCode));
		this._processManager.onProcessData(ev => {
			this._initialDataEvents?.push(ev.data);
			this._onData.fire(ev.data);
		});
		this._processManager.onProcessOverrideDimensions(e => this.setDimensions(e, true));
		this._processManager.onProcessResolvedShellLaunchConfig(e => this._setResolvedShellLaunchConfig(e));
		this._processManager.onEnvironmentVariableInfoChanged(e => this._onEnvironmentVariableInfoChanged(e));
		this._processManager.onProcessShellTypeChanged(type => this.setShellType(type));
		this._processManager.onPtyDisconnect(() => {
			this._safeSetOption('disableStdin', true);
			this.statusList.add({
				id: TerminalStatus.Disconnected,
				severity: Severity.Error,
				icon: Codicon.debugDisconnect,
				tooltip: nls.localize('disconnectStatus', "Lost connection to process")
			});
		});
		this._processManager.onPtyReconnect(() => {
			this._safeSetOption('disableStdin', false);
			this.statusList.remove(TerminalStatus.Disconnected);
		});
	}