mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-11 19:16:42 +00:00
fix for #246.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1881 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
e003b9853d
commit
849942fc8f
1 file changed
+2
-1
@@ -228,7 +228,7 @@ public final class Slave implements Node, Serializable {
|
||||
try {
|
||||
listener.getLogger().println("Launching slave agent");
|
||||
listener.getLogger().println("$ "+slave.agentCommand);
|
||||
Process proc = Runtime.getRuntime().exec(slave.agentCommand);
|
||||
final Process proc = Runtime.getRuntime().exec(slave.agentCommand);
|
||||
|
||||
// capture error information from stderr. this will terminate itself
|
||||
// when the process is killed.
|
||||
@@ -242,6 +242,7 @@ public final class Slave implements Node, Serializable {
|
||||
if(cause!=null)
|
||||
cause.printStackTrace(listener.error("slave agent was terminated"));
|
||||
channel = null;
|
||||
proc.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user