2017-05-15 7:14 GMT+02:00 David Holmes <david.hol...@oracle.com>: >> There would have to be a caveat on System.getenv(true) if we went that >> path, that it is up to the user to ensure it is called in as safe a >> manner as possible having regard to any concurrent updates in their >> application code and how the environment is managed on a given platform.
If we get a System.setEnv in Java we can synchronise that method access, either internally or by asking the user to explicitly synchronise. That would not protect from direct system calls, but it with a proper Java API that would be the recommended way to set environment variables, thus lowering the risk. The question is if this use case is really that compelling that justify an official wrapper against set/putEnv. Cheers, Mario -- pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 63E3 80F2 40CF Java Champion - Blog: http://neugens.wordpress.com - Twitter: @neugens Proud GNU Classpath developer: http://www.classpath.org/ OpenJDK: http://openjdk.java.net/projects/caciocavallo/ Please, support open standards: http://endsoftpatents.org/