-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: improve windows background process handling and cleanup #1146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📋 Review SummaryThis PR significantly improves Windows background process handling and overall process cleanup reliability. The changes address critical issues with background command execution on Windows by implementing a proper keep-alive mechanism and adding robust cleanup procedures for both PTYs and child processes. Additionally, timeout support has been added to prevent commands from hanging indefinitely. 🔍 General Feedback
🎯 Specific Feedback🔴 CriticalNo specific issues identified in this review. 🟡 HighNo specific issues identified in this review. 🟢 Medium
🔵 Low
✅ Highlights
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
Summary
This PR addresses issues with executing background terminal commands on Windows and improves the overall process cleanup reliability. It ensures that background processes on Windows are correctly tracked and terminated, preventing orphaned processes.
Key Changes
ping ...) to ensure the shell process remains active and attached. This allows for proper PID tracking and cleanup, solving the issue where detached processes were untrackable.ShellExecutionServiceto ensure all spawned PTYs and child processes are terminated when the main process exits (handlingSIGINT,SIGTERM, andexit).timeoutparameter to theshell_integrationtool to prevent commands from hanging indefinitely.Related Issue
Demo / Videos
Before Fix (Incorrect Behavior):
badCut.mp4
After Fix (Correct Behavior):
goodCut.1.mp4