Skip to content

Commit

Permalink
fix: master process exit, child process exit
Browse files Browse the repository at this point in the history
  • Loading branch information
hubcarl committed Apr 9, 2018
1 parent c615a42 commit 0f4f433
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/child-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ process.on('message', m => {
webpackTool.openBrowser(m.appPort, m.browser);
}
});
// 使用Control+C键,可以触发SIGINT信号
process.on('SIGINT', () => {
process.exit(0);
});
process.on('SIGTERM', () => {
process.exit(0);
});

0 comments on commit 0f4f433

Please sign in to comment.