Clean up temporary files created for Windows background processes#300
Merged
swissspidy merged 6 commits intotry/osfrom Feb 5, 2026
Merged
Clean up temporary files created for Windows background processes#300swissspidy merged 6 commits intotry/osfrom
swissspidy merged 6 commits intotry/osfrom
Conversation
1 task
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Address feedback on improving compatibility with other operating systems
Clean up temporary files created for Windows background processes
Feb 5, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes a resource leak where temporary files created for background processes on Windows were never cleaned up. The implementation adds proper tracking and cleanup of these temporary files both on process failure and at scenario completion.
Changes:
- Added
$temp_filesproperty to track temporary file paths for cleanup - Implemented cleanup logic in
afterScenariohook after process termination - Added immediate cleanup when background process fails to start on Windows
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
background_proc()method creates temporary files for stdout/stderr on Windows but never deletes them, leaving orphaned files on the filesystem.Changes:
$temp_filesproperty to store file paths for cleanupAfterScenariohook when process terminatescleanup_temp_files()to handle safe deletion with existence checksImplementation:
Temp files now cleaned up regardless of process success/failure.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.