From a6684093da3fe7aba85e1dd2410cda3217fb6d37 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Tue, 16 Jun 2009 23:32:57 +0000 Subject: [PATCH] fixed NPE git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18984 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/Proc.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/Proc.java b/core/src/main/java/hudson/Proc.java index c265d5364e..cc9ad75efe 100644 --- a/core/src/main/java/hudson/Proc.java +++ b/core/src/main/java/hudson/Proc.java @@ -168,8 +168,8 @@ public abstract class Proc { // problems like that shows up as inifinite wait in join(), which confuses great many users. // So let's do a timed wait here and try to diagnose the problem copier.join(10*1000); - copier2.join(10*1000); - if(copier.isAlive() || copier2.isAlive()) { + if(copier2!=null) copier2.join(10*1000); + if(copier.isAlive() || (copier2!=null && copier2.isAlive())) { // looks like handles are leaking. // closing these handles should terminate the threads. String msg = "Process leaked file descriptors. See http://hudson.gotdns.com/wiki/display/HUDSON/Spawning+processes+from+build for more information";