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

Use ProcessInfo.processInfo.environment instead of environ. #571

Closed
adam-fowler opened this issue Sep 29, 2024 · 2 comments · Fixed by #573
Closed

Use ProcessInfo.processInfo.environment instead of environ. #571

adam-fowler opened this issue Sep 29, 2024 · 2 comments · Fixed by #573
Labels
good first issue Good for newcomers

Comments

@adam-fowler
Copy link
Member

We are using Foundation in Hummingbird now so this shouldn't be an issue. It'll also allow us to get around the static sdk issues with environ.

@adam-fowler adam-fowler changed the title Use ProcessInfo.processing.environment instead of environ. Use ProcessInfo.processInfo.environment instead of environ. Sep 29, 2024
@adam-fowler adam-fowler added the good first issue Good for newcomers label Sep 29, 2024
@Joannis
Copy link
Member

Joannis commented Sep 29, 2024

I don't know why, but I've found Foundation ProcessInfo's environment to be not-thread safe at a customer. Maybe that's no longer the case with swift-foundation though.

@adam-fowler
Copy link
Member Author

I had a look through the code and it looks thread safe. It'll be better than using environ where in glibc/darwin it claims to be Sendable but there's a good chance it isn't. It is a char**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants