Recover gracefully from failing to load winp.

(<a href="http://www.nabble.com/Unable-to-load-winp.dll-td22423157.html">report</a>)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16153 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-03-10 19:32:23 +00:00
1 parent 02307fa761
commit d280f213c4
1 file changed
+11 -6
@@ -126,16 +126,21 @@ public abstract class ProcessTreeKiller {
if(!enabled)
return DEFAULT;
if(File.pathSeparatorChar==';')
try {
if(File.pathSeparatorChar==';')
return new Windows();
String os = Util.fixNull(System.getProperty("os.name"));
if(os.equals("Linux"))
String os = Util.fixNull(System.getProperty("os.name"));
if(os.equals("Linux"))
return new Linux();
if(os.equals("SunOS"))
if(os.equals("SunOS"))
return new Solaris();
if(os.equals("Mac OS X"))
return new Darwin();
if(os.equals("Mac OS X"))
return new Darwin();
} catch (LinkageError e) {
LOGGER.warning("Failed to load winp. Reverting to the default");
enabled = false;
}
return DEFAULT;
}