Enhance Process Identification to Fix PID Recycling Issue#11
Merged
Conversation
…ng and custom launch logic
…ibility details for SingleAppInstance class
…l implementation details for SingleAppInstance
…nce tests and project structure
…est methods, ensuring accurate PID file handling and process information validation.
…n memory usage, coding standards, and project management practices.
…e handling and initial state checks
…vel parallelization
…emove unnecessary try-finally blocks, ensuring clearer test flow and improved readability.
…s and improve resource management
…documentation checks
…e mode with `git` commands
Added a `TestInitialize` method to ensure the PID directory exists and the PID file is deleted before each test. Removed redundant PID file deletion from individual test methods to improve code cleanliness and maintainability.
Modified the `dotnet test` command in the `Test` step to include the `-m:1` option. This change aims to improve test execution consistency and optimize resource management during the testing phase.
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.
This PR addresses issue #10 by implementing enhanced process identification that goes beyond just checking PIDs.
Key Improvements
1. Enhanced Process Detection
2. Improved Storage Format
ProcessInfoclass to maintain structured data about running processes3. Backward Compatibility
4. Robust Error Handling
5. Test Improvements
DoNotParallelizeattribute and setMaxCpuCount=1in.runsettings6. Documentation Updates
These changes ensure that the
SingleAppInstancelibrary can correctly identify whether a process with a given PID is actually the same application or a different one that received a recycled PID after system restart.Fixes #10