Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

child process not returned by .run #42

Open
DavidBruant opened this issue Jun 29, 2015 · 1 comment
Open

child process not returned by .run #42

DavidBruant opened this issue Jun 29, 2015 · 1 comment

Comments

@DavidBruant
Copy link

The readme suggests the spawned process is returned.

It doesn't look like it is, though

gulp-express/index.js

Lines 70 to 111 in 9a3c842

run: function (args, options, livereload) {
//deal with args
if(util.isArray(args) && args.length){
config.args = args;
}
//deal with options
config.options = merge(config.options, options || {});
//deal with livereload
if(livereload === false){ //livereload disabled
config.livereload = false;
}else if(livereload){
if(typeof livereload === 'object'){
config.livereload = livereload;
}else{
config.livereload.port = livereload;
}
}
if (server) { // server already running
debug(info('kill server'));
server.kill('SIGKILL');
//server.removeListener('exit', callback.serverExit);
server = undefined;
} else {
if(config.livereload){
lr = tinylr(config.livereload);
lr.listen(config.livereload.port, callback.lrServerReady);
}
}
server = spawn('node', config.args, config.options);
server.stdout.setEncoding('utf8');
server.stderr.setEncoding('utf8');
server.stdout.on('data', callback.serverLog);
server.stderr.on('data', callback.serverError);
server.once('exit', callback.serverExit);
process.listeners('exit') || process.once('exit', callback.processExit);
},

@ORESoftware
Copy link

i am actually looking for a related answer to a related question

gulpjs/gulp#1464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants