mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 02:26:18 +00:00
Merged revisions 31908-31909 via svnmerge from
https://svn.dev.java.net/svn/hudson/branches/rc ........ r31908 | kohsuke | 2010-06-09 20:47:06 -0700 (Wed, 09 Jun 2010) | 1 line additional compilation problem ........ r31909 | kohsuke | 2010-06-09 21:08:13 -0700 (Wed, 09 Jun 2010) | 1 line fixing compilation problems ........ git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@31910 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
1254d91ac1
commit
dce4dfacfb
3 files changed
+28
-8
No files matched your search
@@ -49,6 +49,8 @@ import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.apache.commons.io.output.NullOutputStream.NULL_OUTPUT_STREAM;
|
||||
|
||||
@@ -651,7 +653,7 @@ public abstract class Launcher {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void kill(Map<String, String> modelEnvVars) {
|
||||
public void kill(Map<String, String> modelEnvVars) throws InterruptedException {
|
||||
ProcessTree.get().killAll(modelEnvVars);
|
||||
}
|
||||
|
||||
@@ -678,7 +680,11 @@ public abstract class Launcher {
|
||||
protected synchronized void terminate(IOException e) {
|
||||
super.terminate(e);
|
||||
ProcessTree pt = ProcessTree.get();
|
||||
pt.killAll(proc,cookie);
|
||||
try {
|
||||
pt.killAll(proc,cookie);
|
||||
} catch (InterruptedException x) {
|
||||
LOGGER.log(Level.INFO, "Interrupted", x);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -746,7 +752,11 @@ public abstract class Launcher {
|
||||
}
|
||||
|
||||
public Void call() throws RuntimeException {
|
||||
ProcessTree.get().killAll(modelEnvVars);
|
||||
try {
|
||||
ProcessTree.get().killAll(modelEnvVars);
|
||||
} catch (InterruptedException e) {
|
||||
// we are asked to terminate early by the caller, so no need to do anything
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -855,4 +865,6 @@ public abstract class Launcher {
|
||||
* Debug option to display full current path instead of just the last token.
|
||||
*/
|
||||
public static boolean showFullPath = false;
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(Launcher.class.getName());
|
||||
}
|
||||
@@ -124,7 +124,11 @@ public class CommandLauncher extends ComputerLauncher {
|
||||
cause.printStackTrace(
|
||||
listener.error(hudson.model.Messages.Slave_Terminated(getTimestamp())));
|
||||
}
|
||||
ProcessTree.get().killAll(proc, cookie);
|
||||
try {
|
||||
ProcessTree.get().killAll(proc, cookie);
|
||||
} catch (InterruptedException e) {
|
||||
LOGGER.log(Level.INFO, "interrupted", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -149,7 +153,11 @@ public class CommandLauncher extends ComputerLauncher {
|
||||
e.printStackTrace(listener.error(msg));
|
||||
|
||||
if(_proc!=null)
|
||||
ProcessTree.get().killAll(_proc, _cookie);
|
||||
try {
|
||||
ProcessTree.get().killAll(_proc, _cookie);
|
||||
} catch (InterruptedException x) {
|
||||
x.printStackTrace(listener.error(Messages.ComputerLauncher_abortedLaunch()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public final class ProcessTreeKiller {
|
||||
*
|
||||
* @deprecated Use {@link OSProcess#killRecursively()}
|
||||
*/
|
||||
public void kill(Process proc) {
|
||||
public void kill(Process proc) throws InterruptedException {
|
||||
kill(proc,null);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public final class ProcessTreeKiller {
|
||||
* If non-null, search-and-destroy will be performed.
|
||||
* @deprecated Use {@link ProcessTree#killAll(Map)} and {@link OSProcess#killRecursively()}
|
||||
*/
|
||||
public void kill(Process proc, Map<String, String> modelEnvVars) {
|
||||
public void kill(Process proc, Map<String, String> modelEnvVars) throws InterruptedException {
|
||||
ProcessTree pt = ProcessTree.get();
|
||||
if(proc!=null)
|
||||
pt.get(proc).killRecursively();
|
||||
@@ -85,7 +85,7 @@ public final class ProcessTreeKiller {
|
||||
* Short for {@code kill(null,modelEnvVars)}
|
||||
* @deprecated Use {@link ProcessTree#killAll(Map)}
|
||||
*/
|
||||
public void kill(Map<String, String> modelEnvVars) {
|
||||
public void kill(Map<String, String> modelEnvVars) throws InterruptedException {
|
||||
kill(null,modelEnvVars);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user