Skip to content

Avoid throwing in ToString() if the process has already exited #53979

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

Merged
merged 2 commits into from
Jul 29, 2021

Conversation

iSazonov
Copy link
Contributor

Fixes #1520

Replace #43597

In #43597 was a test fail because we called a process property and initialized internal process cache. So I split the test - one for running process, (2) second for exited process without calling any properties/methods for the test process to avoid the cache initialization.

@ghost
Copy link

ghost commented Jun 10, 2021

Tagging subscribers to this area: @carlossanlop
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #1520

Replace #43597

In #43597 was a test fail because we called a process property and initialized internal process cache. So I split the test - one for running process, (2) second for exited process without calling any properties/methods for the test process to avoid the cache initialization.

Author: iSazonov
Assignees: -
Labels:

area-System.Diagnostics.Process

Milestone: -

@iSazonov
Copy link
Contributor Author

iSazonov commented Jun 10, 2021

I don't know why the test crashes only in runtime-staging. :-(

@terrajobst terrajobst added the community-contribution Indicates that the PR has been added by a community member label Jul 19, 2021
@jeffhandley jeffhandley requested a review from carlossanlop July 23, 2021 21:18
@jeffhandley
Copy link
Member

@carlossanlop This PR is assigned to you for follow-up/decision before the RC1 snap.

@danmoseley danmoseley merged commit a584280 into dotnet:main Jul 29, 2021
@iSazonov iSazonov deleted the fix-process-tostring branch July 30, 2021 03:28
@ghost ghost locked as resolved and limited conversation to collaborators Aug 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Diagnostics.Process community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Process.ToString() can throw
5 participants