hooking up ProcessTreeKiller

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7976 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-03-23 05:02:01 +00:00
1 parent a720687c69
commit a1fbc4bffc
3 files changed
+36 -32

No files matched your search

+2 -7
View File
@@ -2,8 +2,8 @@ package hudson;
import hudson.remoting.Channel;
import hudson.util.IOException2;
import hudson.util.ProcessTreeKiller;
import hudson.util.StreamCopyThread;
import hudson.model.Hudson;
import java.io.File;
import java.io.IOException;
@@ -15,8 +15,6 @@ import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jvnet.winp.WinProcess;
/**
* External process wrapper.
*
@@ -162,10 +160,7 @@ public abstract class Proc {
* Destroys the child process without join.
*/
private void destroy() {
if(Hudson.isWindows())
new WinProcess(proc).killRecursively();
else
proc.destroy();
ProcessTreeKiller.get().kill(proc);
}
private static class ByteCopier extends Thread {