-
Notifications
You must be signed in to change notification settings - Fork 56
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
Ban env functions #207
Ban env functions #207
Conversation
Why is it a bad practice? |
Inside the xml I have a linked issue.. In short words these function are not thread safe and one thread can affect the other |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getenv() is the only way to access parent envs from within children process. It's not always possible to avoid using it.
Hm.. interesting scenario.. Shouldn't environmental variables be set on the machine? Once they are set on the machine aren't they set for both processes? So.. why parent/child processes should use env parameters to communicate with each other? |
It's not always set "on machine". |
Hi.. I also have a code where I spawn children processes from a parent and I do this too
But I am passing FOO from the parent to the children during the spawn. The only reason I see that a child will want to read the Still I think that this will cover 99% of the case. Is your concern only for |
Do we have an example where usage of getenv or putenv is actually required then? I'm confused by the discussion a little bit. |
See |
@Ocramius you mean |
I edited the previous message 😅 |
ping @gmponos do you plan on iterating on this? I'm trying to see what could ship in 9.0.0 |
Break down #200 and started by the env functions.. also sort the functions to the ones that are alias and the ones that are bad practice to use.