fix(desktop): kill orphaned terminal daemon processes during teardown#1480
Conversation
Electron terminal-host and pty-subprocess processes spawned from a worktree's node_modules persist after the worktree is deleted. Add a teardown step that finds and kills these processes by matching the worktree path before the directory is removed.
📝 WalkthroughWalkthroughAdded a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
terminal-host.jsandpty-subprocess.jsprocesses spawned from a worktree's node_modules persist as orphans after the worktree is deletedChanges
.superset/teardown.sh: Addedstep_kill_terminal_daemonsfunction that usespgrep -fto find Electron processes matching<worktree_path>/.*terminal-host.jsand<worktree_path>/.*pty-subprocess.js, then sendsSIGTERMto eachTest Plan
ps aux | grep terminal-hostSummary by CodeRabbit