ProcessTests: redirect stdio and kill entire process tree for shell-script-based tests.#127566
Open
tmds wants to merge 3 commits intodotnet:mainfrom
Open
ProcessTests: redirect stdio and kill entire process tree for shell-script-based tests.#127566tmds wants to merge 3 commits intodotnet:mainfrom
tmds wants to merge 3 commits intodotnet:mainfrom
Conversation
…cript-based tests. The LongProcessNamesAreSupported and ProcessNameMatchesScriptName tests spawn a shell script that runs sleep as a grandchild. Killing only the shell left the sleep process alive, holding stdout/stderr pipes open for the parent that runs the tests.
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process |
adamsitnik
reviewed
Apr 29, 2026
Member
adamsitnik
left a comment
There was a problem hiding this comment.
Overall it LGTM, but I wonder why do we need to redirect std OUT and ERR here.
Open
3 tasks
adamsitnik
reviewed
Apr 30, 2026
Member
adamsitnik
left a comment
There was a problem hiding this comment.
@tmds thank you for your contribution
After my experience in dotnet/sdk#54093 (comment) I believe we are going to have to implement #119650 as well and simply produce warnings for Process usages that enable redirection without consuming produced out/err. Thanks!
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
adamsitnik
approved these changes
Apr 30, 2026
Member
adamsitnik
left a comment
There was a problem hiding this comment.
LGTM
@tmds I am going to apply the last suggestion and enable auto merge, I hope you don't mind
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
This was referenced Apr 30, 2026
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 LongProcessNamesAreSupported and ProcessNameMatchesScriptName tests spawn a shell script that runs sleep as a grandchild. Killing only the shell left the sleep process alive, holding stdout/stderr pipes open for the parent that runs the tests.
@dotnet/area-system-diagnostics-process ptal.