Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/cmd/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class StartCommand extends Command {
this.logger.info('%s started on %s', this.frameworkName, msg.data.address);
child.unref();
child.disconnect();
process.exit(0);
this.exit(0);
}
});

Expand All @@ -177,7 +177,7 @@ class StartCommand extends Command {
[ 'SIGINT', 'SIGQUIT', 'SIGTERM' ].forEach(event => {
process.once(event, () => {
signal = event;
process.exit(0);
this.exit(0);
});
});
process.once('exit', () => {
Expand Down Expand Up @@ -246,7 +246,7 @@ class StartCommand extends Command {
if (!isSuccess) {
this.child.kill('SIGTERM');
yield sleep(1000);
process.exit(1);
this.exit(1);
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ class Command extends BaseCommand {

return context;
}

exit(code) {
process.exit(code);
}
}

module.exports = Command;