diff --git a/src/bin.ts b/src/bin.ts index 8b8e7640..e8bc89a1 100644 --- a/src/bin.ts +++ b/src/bin.ts @@ -56,6 +56,11 @@ v8flags(function (err, v8flags) { { stdio: 'inherit' } ) + process.once('SIGINT', () => { + // trap SIGINT to prevents main process from finishing + // before the child one does + }) + proc.on('exit', function (code: number, signal: string) { process.on('exit', function () { if (signal) {