src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts/SharedProcessMain/registerListeners
class SharedProcessMain:	private registerListeners(): void {

		// Shared process lifecycle
		const onExit = () => this.dispose();
		process.once('exit', onExit);
		ipcRenderer.once('vscode:electron-main->shared-process=exit', onExit);

		// Shared process worker lifecycle
		//
		// We dispose the listener when the shared process is
		// disposed to avoid disposing workers when the entire
		// application is shutting down anyways.
		//
		const eventName = 'vscode:electron-main->shared-process=disposeWorker';
		const onDisposeWorker = (event: unknown, configuration: ISharedProcessWorkerConfiguration) => this.onDisposeWorker(configuration);
		ipcRenderer.on(eventName, onDisposeWorker);
		this._register(toDisposable(() => ipcRenderer.removeListener(eventName, onDisposeWorker)));
	}