src/vs/platform/sharedProcess/electron-browser/sharedProcessWorkerMain.ts/SharedProcessWorkerMain/spawn
class SharedProcessWorkerMain:	private spawn(port: MessagePort, configuration: ISharedProcessWorkerConfiguration, environment: ISharedProcessWorkerEnvironment): void {
		try {

			// Ensure to terminate any existing process for config
			this.terminate(configuration);

			// Spawn a new worker process with given configuration
			const process = new SharedProcessWorkerProcess(port, configuration, environment);
			process.spawn();

			// Handle self termination of the child process
			const listener = Event.once(process.onDidProcessSelfTerminate)(reason => {
				send({
					id: SharedProcessWorkerMessages.SelfTerminated,
					configuration,
					message: JSON.stringify(reason)
				});
			});

			// Remember in map for lifecycle
			const configurationHash = hash(configuration);
			this.processes.set(configurationHash, toDisposable(() => {
				listener.dispose();

				// Terminate process
				process.dispose();

				// Remove from processes
				this.processes.delete(configurationHash);
			}));
		} catch (error) {
			Logger.error(`Unexpected error forking worker process: ${toErrorMessage(error)}`);
		}
	}