modules/orionode/languages/jdt/index.js
function fork(modulePath, args, options) {
	return new Promise((resolve, reject) => {
		const newEnv = generatePatchedEnv(process.env, options.IN_PORT, options.OUT_PORT),
		childProcess = cp.spawn(modulePath, args, {
			silent: true,
			cwd: options.cwd,
			env: newEnv,
			execArgv: options.execArgv
		});
		childProcess.once('error', function(err) {
			logger.error("Java process error event");
			logger.error(err);
			reject(err);
		});
		childProcess.once('exit', function(err) {
			logger.error("Java process exit event");
			logger.error(err);
			reject(err);
		});
		resolve(childProcess);
	});
}
function fork(modulePath, args, options) {
	return new Promise((resolve, reject) => {
		const newEnv = generatePatchedEnv(process.env, options.IN_PORT, options.OUT_PORT),
		childProcess = cp.spawn(modulePath, args, {
			silent: true,
			cwd: options.cwd,
			env: newEnv,
			execArgv: options.execArgv
		});
		childProcess.once('error', function(err) {
			logger.error("Java process error event");
			logger.error(err);
			reject(err);
		});
		childProcess.once('exit', function(err) {
			logger.error("Java process exit event");
			logger.error(err);
			reject(err);
		});
		resolve(childProcess);
	});
}
function fork ( modulePath , args , options ) { return new Promise ( ( resolve , reject ) => { const newEnv = generatePatchedEnv ( process . env , options . IN_PORT , options . OUT_PORT ) , childProcess = cp . spawn ( modulePath , args , { silent : true , cwd : options . cwd , env : newEnv , execArgv : options . execArgv } ) ; childProcess . once ( 'error' , function ( err ) { logger . error ( "Java process error event" ) ; logger . error ( err ) ; reject ( err ) ; } ) ; childProcess . once ( 'exit' , function ( err ) { logger . error ( "Java process exit event" ) ; logger . error ( err ) ; reject ( err ) ; } ) ; resolve ( childProcess ) ; } ) ; }
Create a new child process
@param {string} modulePath The module path to spawn
@param {{?}} args The arguments array
@param {{?}} options The map of options
@returns {Promise} A promise to spawn the child process
Create a new child process