Skip to content

Commit

Permalink
fix: rs to restart
Browse files Browse the repository at this point in the history
Always unhook the process.stdin when the child has exited, this allows the `rs` command to be read - otherwise it's ignored.

Fixes remy#648
  • Loading branch information
remy committed Oct 19, 2015
1 parent 0b13116 commit 8a0ce09
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/monitor/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ function run(options) {

// exit the monitor, but do it gracefully
if (signal === 'SIGUSR2') {
// restart
restart();
return restart();
} else if (code === 0) { // clean exit - wait until file change to restart
if (runCmd) {
utils.log.status('clean exit - waiting for changes before restart');
Expand All @@ -161,13 +160,14 @@ function run(options) {
utils.log.fail('app crashed - waiting for file changes before' +
' starting...');
child = null;
if (config.options.restartable) {
// stdin needs to kick in again to be able to listen to the
// restart command
process.stdin.resume();
}
}
}

if (config.options.restartable) {
// stdin needs to kick in again to be able to listen to the
// restart command
process.stdin.resume();
}
});

run.kill = function (noRestart, callback) {
Expand Down

0 comments on commit 8a0ce09

Please sign in to comment.