You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gn...@apache.org on 2008/11/27 22:36:54 UTC
svn commit: r721283 -
/geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
Author: gnodet
Date: Thu Nov 27 13:36:54 2008
New Revision: 721283
URL: http://svn.apache.org/viewvc?rev=721283&view=rev
Log:
Upgrade to latest sshd
Modified:
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
Modified: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java?rev=721283&r1=721282&r2=721283&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java Thu Nov 27 13:36:54 2008
@@ -114,6 +114,8 @@
private OutputStream err;
+ private ExitCallback callback;
+
private IO io;
private Variables variables;
@@ -132,23 +134,16 @@
this.err = err;
}
+ public void setExitCallback(ExitCallback callback) {
+ this.callback = callback;
+ }
+
public void start(final Map<String,String> env) throws IOException {
this.io = new IO(in, out, err, false);
this.variables = new Variables((Map)env);
new Thread(this).start();
}
- public boolean isAlive() {
- return !closed;
- }
-
- public int exitValue() {
- if (!closed) {
- throw new IllegalThreadStateException();
- }
- return 0;
- }
-
public void destroy() {
close();
}
@@ -177,6 +172,7 @@
public void close() {
closed = true;
Closer.close(in, out, err);
+ callback.onExit(0);
}
public boolean isInteractive() {