Skip to content

Commit b280378

Browse files
authored
Abort the watcher if stdin is closed to avoid zombie processes (#4997)
* Abort the watcher if stdin is closed to avoid zombie processes * Apply suggestions from code review
1 parent 4daa86a commit b280378

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/cli.js

+3
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,9 @@ async function build() {
784784
}
785785

786786
if (shouldWatch) {
787+
/* Abort the watcher if stdin is closed to avoid zombie processes */
788+
process.stdin.on('end', () => process.exit(0))
789+
process.stdin.resume()
787790
startWatcher()
788791
} else {
789792
buildOnce()

0 commit comments

Comments
 (0)