From 8bab2de90c933e644176814e068df6230d7ecb7c Mon Sep 17 00:00:00 2001 From: James Duley Date: Mon, 15 Aug 2022 13:56:35 +1200 Subject: [PATCH] Add remark about Unix for SetEnvironmentVariable In regard to https://github.com/dotnet/runtime/issues/9529 --- xml/System/Environment.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xml/System/Environment.xml b/xml/System/Environment.xml index 16c437347cf..e59b680e7dd 100644 --- a/xml/System/Environment.xml +++ b/xml/System/Environment.xml @@ -1930,6 +1930,8 @@ If the executable is renamed or deleted before this property is first accessed, ## Remarks Calling this method is equivalent to calling the overload with a value of for the `target` argument. + On .NET on macOS and Linux systems, calls to the method have no effect on any native libraries that are, or will be, loaded. + If the `value` argument is not empty (see the discussion of deleting an environment variable later in this section for the definition of an empty value) and the environment variable named by the `variable` parameter does not exist, the environment variable is created and assigned the contents of `value`. If it does exist, its value is modified. Because the environment variable is defined in the environment block of the current process only, it does not persist after the process has ended. If `variable` contains a non-initial hexadecimal zero character, the characters before the zero character are considered the environment variable name and all subsequent characters are ignored. @@ -2033,6 +2035,8 @@ In addition, on Windows systems only, the method with a value of or are ignored. +On .NET on macOS and Linux systems, calls to the method with a value of have no effect on any native libraries that are, or will be, loaded. + If the `value` argument is not empty (see the discussion of deleting an environment variable later in this section for the definition of an empty value) and the environment variable named by the `variable` argument does not exist, the environment variable is created and assigned the contents of `value`. If it does exist, its value is modified. If `variable` contains a non-initial hexadecimal zero character, the characters before the zero character are considered the environment variable name and all subsequent characters are ignored.