Lines Matching refs:environment

5 working with the current _process' execution environment.
65 $(LREF environment) is an interface through which the current _process'
66 environment variables can be read and manipulated.)
183 directories listed in the PATH environment variable, in the order
192 $(LI The directories listed in the PATH environment variable.)
210 By default, the child process inherits the environment of the parent
212 parameter. If the same variable exists in both the parent's environment
216 process will $(I not) inherit the parent's environment. Its entire
217 environment will then be determined by $(D env).
268 env = Additional environment variables for the child process.
389 // Prepare environment.
697 // Prepare environment.
778 // environment strings that are not present in childEnv. If the parent's
779 // environment should be inherited without modification, this function
785 // Determine the number of strings in the parent's environment.
800 // Add the parent's environment.
838 // Converts childEnv to a Windows environment block, which is on the form
840 // those of the current process' environment strings that are not present
841 // in childEnv. Returns null if the parent's environment should be
862 auto parentEnv = mergeWithParentEnv ? environment.toAA() : null;
870 // Add remaining parent environment variables.
873 // Two final zeros are needed in case there aren't any environment vars,
1056 environment.remove("std_process_unittest1"); // Just in case.
1057 environment.remove("std_process_unittest2");
1061 environment["std_process_unittest1"] = "1";
1073 environment.remove("std_process_unittest1");
1388 By default, the child process inherits the parent's environment,
1389 and any environment variables passed to $(LREF spawnProcess) will
1391 child process' environment will be those given to spawnProcess.
2032 env = Additional environment variables for the child process.
2413 env = Additional environment variables for the child process.
2612 On Windows, this function returns the contents of the COMSPEC environment
2615 On POSIX, $(D userShell) returns the contents of the SHELL environment
2621 version (Windows) return environment.get("COMSPEC", nativeShell);
2622 else version (Posix) return environment.get("SHELL", nativeShell);
3291 abstract final class environment
3295 Retrieves the value of the environment variable with the given $(D name).
3297 auto path = environment["PATH"];
3301 $(OBJECTREF Exception) if the environment variable does not exist,
3306 $(LREF environment.get), which doesn't throw on failure.
3317 Retrieves the value of the environment variable with the given $(D name),
3320 Unlike $(LREF environment.opIndex), this function never throws.
3322 auto sh = environment.get("SHELL", "/bin/sh");
3325 environment variable.
3327 auto myVar = environment.get("MYVAR");
3349 Assigns the given $(D value) to the environment variable with the given
3351 If $(D value) is null the variable is removed from environment.
3356 environment["foo"] = "bar";
3360 $(OBJECTREF Exception) if the environment variable could not be added
3364 On some platforms, modifying environment variables may not be allowed in
3385 "Invalid environment variable name: '"~name~"'");
3387 "Failed to add environment variable");
3403 Removes the environment variable with the given $(D name).
3405 If the variable isn't in the environment, this function returns
3409 On some platforms, modifying environment variables may not be allowed in
3421 Identify whether a variable is defined in the environment.
3430 if ("MY_ENV_FLAG" in environment)
3434 if ("MY_ENV_VAR" in environment)
3435 doSomething(environment["MY_ENV_VAR"]);
3438 if (auto var = environment.get("MY_ENV_VAR"))
3463 Copies all environment variables into an associative array.
3466 While Windows environment variable names are case insensitive, D's
3471 $(OBJECTREF Exception) if the environment variables could not
3492 // In POSIX, environment variables may be defined more
3496 // http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/environment-variables.html
3505 enforce(envBlock, "Failed to retrieve environment variables.");
3523 // Just like in POSIX systems, environment variables may be
3524 // defined more than once in an environment block on Windows,
3537 // Retrieves the environment variable, returns false on failure.
3542 // first we ask windows how long the environment variable is,
3551 // if the environment variable is missing, not on other errors.
3596 // resize and go around again, because the environment variable grew
3629 environment["std_process"] = "foo";
3630 assert(environment["std_process"] == "foo");
3631 assert("std_process" in environment);
3634 environment["std_process"] = "b";
3635 assert(environment["std_process"] == "b");
3636 assert("std_process" in environment);
3639 environment.remove("std_process");
3640 assert("std_process" !in environment);
3643 environment.remove("std_process");
3644 assert("std_process" !in environment);
3647 assertThrown(environment["std_process"]);
3650 assert(environment.get("std_process") is null);
3653 assert(environment.get("std_process", "baz") == "baz");
3656 environment["std_process"] = "";
3657 auto res = environment.get("std_process");
3660 assert("std_process" in environment);
3666 auto aa = environment.toAA();
3670 // Wine has some bugs related to environment variables:
3675 assert(v == environment[n]);
3680 environment[n] = v;
3683 auto aa2 = environment.toAA();
3686 assert("std_process" in environment);
3689 environment["std_process"] = null;
3690 assert("std_process" !in environment);
3782 versions of $(D exec) search the PATH environment variable for $(D
3784 environment variables as an array of strings of the form key=value.