Skip to content

Commit 0756243

Browse files
committed
Force cleanup on stdin/out/err on exit
1 parent ea7ac9a commit 0756243

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ if (!amMainInstance) {
154154
console.log('Failed to kill server', error);
155155
logError(error);
156156
} finally {
157+
if (process.stdin) process.stdin.destroy();
158+
if (process.stdout) process.stdout.destroy();
159+
if (process.stderr) process.stderr.destroy();
160+
157161
// We've done our best - now shut down for real.
158162
app.quit();
159163
}

0 commit comments

Comments
 (0)