Permalink
Browse files

Merge pull request #752 from lmwang/master

[FIXED JENKINS-8614] ProcessTreeTest fails on Windows
  • Loading branch information...
jglick committed Apr 8, 2013
2 parents b99a794 + cdc18ec commit 91000fa5699c5fc7b48fcb061be9ded980aa8639
Showing with 12 additions and 1 deletion.
  1. +12 −1 core/src/main/java/hudson/util/ProcessTree.java
@@ -67,6 +67,7 @@

import static com.sun.jna.Pointer.NULL;
import static hudson.util.jna.GNUCLibrary.LIBC;
import static java.util.logging.Level.FINE;
import static java.util.logging.Level.FINER;
import static java.util.logging.Level.FINEST;

@@ -424,7 +425,17 @@ public void kill() throws InterruptedException {

@Override
public synchronized EnvVars getEnvironmentVariables() {
if(env==null) env = new EnvVars(p.getEnvironmentVariables());
if(env !=null)
return env;
env = new EnvVars();

try
{
env.putAll(p.getEnvironmentVariables());
} catch (WinpException e)
{
LOGGER.log(FINE, "Failed to get environment variable ", e);
}
return env;
}
});

0 comments on commit 91000fa

Please sign in to comment.