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

Move Get/SetEnvironmentVariable to CoreLib #19463

Closed
JeremyKuhne opened this issue Nov 23, 2016 · 6 comments
Closed

Move Get/SetEnvironmentVariable to CoreLib #19463

JeremyKuhne opened this issue Nov 23, 2016 · 6 comments
Assignees
Milestone

Comments

@JeremyKuhne
Copy link
Member

Due to the lack of thread safety with environment variables on Unix the values are cached in the CoreFX implementation.

This causes Path.GetTempPath() and anything else that tries to get an environment variable in CoreLib to not have the up-to-date values. See the failing tests in dotnet/corefx#13920.

We should move the implementation to Internal.Runtime.Augments so we have one source of truth.

@JeremyKuhne JeremyKuhne self-assigned this Nov 23, 2016
@JeremyKuhne
Copy link
Member Author

@jkotas Any issues with doing this?

cc: @ianhays, @stephentoub

@jkotas
Copy link
Member

jkotas commented Nov 23, 2016

Sounds reasonable to me.

@jkotas
Copy link
Member

jkotas commented Nov 23, 2016

The Windows-only overloads that write to registry may still stay in corefx.

@AlexGhiondea
Copy link
Contributor

@JeremyKuhne we marked this for 1.2 -- let me know if you disagree.

@danmoseley
Copy link
Member

@JeremyKuhne does more remain here? I think you nentioned a change in the PAL.

@JeremyKuhne
Copy link
Member Author

dotnet/corefx#14425

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.0.0 milestone Jan 31, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants