Skip to content
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

Ensure Process.ProcessName doesn't change when setting Thread.Name on Linux #19706

Closed

Conversation

monojenkins
Copy link
Contributor

!! This PR is a copy of dotnet/runtime#34064, please do not edit or review it in this repo !!
Do not automatically approve this PR:

* Consider how the changes affect configurations in this repo,
* Check effects on files that are not mirrored,
* Identify test cases that may be needed in this repo.

!! Merge the PR only after the original PR is merged !!



Fixes dotnet/runtime#33673

This issue is a side-effect of adding support for setting thread names on Linux in dotnet/coreclr#27182.

cc @janvorli @lpereira @SteveL-MSFT

@danmoseley
Copy link
Contributor

This doesn't compile and I can't look further right now so feel free to close. Unless you know the correct pattern to use

@akoeplinger
Copy link
Member

@danmosemsft the CoreCLR side of the change simply casts the thread id to pid_t so you can presumably do the same. Note that you'd need to move it to #elif defined (HAVE_PTHREAD_SETNAME_NP) instead of the __MACH__ block where you have it now.

@monojenkins monojenkins force-pushed the sync-pr-34064-from-runtime branch from d6ed581 to 9c3fab9 Compare May 5, 2020 20:23
… Linux

Fixes dotnet/runtime#33673

This issue is a side-effect of adding support for setting thread names on Linux in dotnet/coreclr#27182.

cc @janvorli @lpereira @SteveL-MSFT
@monojenkins monojenkins force-pushed the sync-pr-34064-from-runtime branch from 9c3fab9 to 7fe6060 Compare May 6, 2020 18:28
@akoeplinger
Copy link
Member

Implementing the correct fix is tracked by dotnet/runtime#35908.

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.

System.Diagnostics.Process.ProcessName returning incorrect information on Linux with .NET 5
4 participants