Skip to content

Commit

Permalink
Make zombie children clean themselves up
Browse files Browse the repository at this point in the history
The parent wds process can crash sometimes when watching too many files, or due to memory pressure on the system, or really any number of reasons. When this happens, the children become zombies and live forever. If the parent crashes though, they'll never be reloaded, and signals from the terminal won't be sent along to them, so they just accumulate and suck up memory on developer machines! Yuck!

This adds active monitoring to the child wds processes so that they notice if the parent is gone, and kill themselves right away if so. This isn't 100% reliable, but this will at least reap most of em so we stop accumulating so much cruft.
  • Loading branch information
airhorns committed Feb 9, 2024
1 parent 8f60ee6 commit 0d13c60
Show file tree
Hide file tree
Showing 7 changed files with 320 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"gitpkg": "^1.0.0-beta.2",
"jest": "^27.4.7",
"prettier": "^2.8.8",
"typescript": "^5.1.3"
"typescript": "^5.1.3",
"zx": "^7.2.3"
},
"packageManager": "pnpm@8.12.1+sha256.28ca61ece5a496148b73fabc9afb820f9c3fec4f55f04ce45a2cea0a5219f2e1"
}
Loading

0 comments on commit 0d13c60

Please sign in to comment.