Skip to content

Commit 672844f

Browse files
authored
Merge pull request #5079 from John-Colvin/patch-20
warn about glibc & changing environment variables
2 parents 7417466 + d9541bf commit 672844f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

std/process.d

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3113,6 +3113,11 @@ static:
31133113
Throws:
31143114
$(OBJECTREF Exception) if the environment variable could not be added
31153115
(e.g. if the name is invalid).
3116+
3117+
Note:
3118+
On some platforms, modifying environment variables may not be allowed in
3119+
multi-threaded programs. See e.g.
3120+
$(LINK2 https://www.gnu.org/software/libc/manual/html_node/Environment-Access.html#Environment-Access, glibc).
31163121
*/
31173122
inout(char)[] opIndexAssign(inout char[] value, in char[] name) @trusted
31183123
{
@@ -3148,6 +3153,11 @@ static:
31483153
31493154
If the variable isn't in the environment, this function returns
31503155
successfully without doing anything.
3156+
3157+
Note:
3158+
On some platforms, modifying environment variables may not be allowed in
3159+
multi-threaded programs. See e.g.
3160+
$(LINK2 https://www.gnu.org/software/libc/manual/html_node/Environment-Access.html#Environment-Access, glibc).
31513161
*/
31523162
void remove(in char[] name) @trusted nothrow @nogc // TODO: @safe
31533163
{

0 commit comments

Comments
 (0)