Skip to content

Commit 495dd4f

Browse files
committedNov 13, 2018
Properly propagate term sig to child lab process
1 parent 03314f7 commit 495dd4f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎bin/lab

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ if (process.env.NODE_DEBUG_OPTION || inspectArg) {
4444
process.exit(code);
4545
});
4646

47+
process.on('SIGTERM', () => {
48+
49+
childLab.kill();
50+
});
51+
4752
return;
4853
}
4954

‎test/cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ describe('CLI', () => {
252252

253253
expect(combinedOutput).to.contain('Debugger listening on').and.to.contain(port.toString());
254254
if (!cli.killed) {
255-
cli.kill();
255+
cli.kill('SIGTERM');
256256
}
257257

258258
resolve();

0 commit comments

Comments
 (0)
Please sign in to comment.