Hi, +-From: "Anderson, Rob (Global Trade)" <[EMAIL PROTECTED]> -- |_Date: Tue, 16 Aug 2005 10:47:25 -0700 _________________________ | |There is a new issue that comes to light, once again. |See the output below... | |Buildfile: ssh_twice_build.xml | |linux: | [sshexec] Connecting to localhost:22 | [sshexec] Hello from localhost | |linux: | [sshexec] Connecting to localhost:22 | |BUILD SUCCESSFUL |Total time: 8 seconds
I think that this issue comes from that System.out will be closed in 'close' method of TeeOutputStream[1]. You know that TeeOutputStream has been used in SSHExec[2]. It seems following modification for TeeOutputStream fixes this problem, public void close() throws IOException { try { left.close(); } finally { if(right!=System.out && right!=System.err) // <--- right.close(); } } but I don't know if such a change is acceptable or not. So, I have planed to re-implement 'execute' method of SSHExec without TeeOutputStream. How do you think of it? [1] org.apache.tools.ant.util.TeeOutputStream [2] org.apache.tools.ant.taskdefs.optional.ssh.SSHExec Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 4-1 OHMACHI 1-CHOME AOBA-KU, SENDAI, MIYAGI 980-0804 Japan. Tel +81-22-723-2150 +1-415-578-3454 Fax +81-22-224-8773 Skype callto://jcraft/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]