Skip to content

Don't keep MTP process alive if pipe disconnects#6477

Merged
Youssef1313 merged 1 commit intomainfrom
dev/ygerges/pipe-disconnect
Sep 1, 2025
Merged

Don't keep MTP process alive if pipe disconnects#6477
Youssef1313 merged 1 commit intomainfrom
dev/ygerges/pipe-disconnect

Conversation

@Youssef1313
Copy link
Copy Markdown
Member

Fixes #6475

@Youssef1313
Copy link
Copy Markdown
Member Author

/backport to rel/3.10

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 1, 2025

Started backporting to rel/3.10: https://github.com/microsoft/testfx/actions/runs/17371740816

@Youssef1313 Youssef1313 merged commit 8d29291 into main Sep 1, 2025
9 checks passed
@Youssef1313 Youssef1313 deleted the dev/ygerges/pipe-disconnect branch September 1, 2025 09:09
Youssef1313 added a commit that referenced this pull request Sep 1, 2025
…6477 (backport to rel/3.10) (#6478)

Co-authored-by: Youssef1313 <youssefvictor00@gmail.com>
// This can happen if the other processes gets killed or crashes while while it's sending the response.
// This is especially important for 'dotnet test', where the user can simply kill the dotnet.exe process themselves.
// In that case, we want the MTP process to also die.
_environment.FailFast("[NamedPipeClient] Connection lost with the other side.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do? Does this actually call Environment.FailFast()? Beware that this may generate a dump of the current process, if the LocalDumps registry key is enabled:
https://github.com/KirillOsenkov/dotfiles/blob/main/LocalDumps.reg
or Azure Watson might be listening too.

Not sure if this is desired, perhaps just do Environment.Exit()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test executable can hang forever when losing pipe connection

3 participants