Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit f6345e3

Browse files
authored
fix(fork): Quit when the parent process exits. (#18)
1 parent 3a1a951 commit f6345e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/bin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ if (argv.logDir) {
2222
let port = proxy.listen(argv.port);
2323
if (argv.fork) {
2424
process.send({ready: true, port: port});
25+
process.on('disconnect', function() {
26+
console.log('parent exited, quitting');
27+
process.exit();
28+
});
2529
}

0 commit comments

Comments
 (0)