@Override public void handleRequest(String req, SSHPacket buf) throws ConnectionException, TransportException { try { if ("xon-xoff".equals(req)) canDoFlowControl = buf.readBoolean(); else if ("exit-status".equals(req)) exitStatus = buf.readUInt32AsInt(); else if ("exit-signal".equals(req)) { exitSignal = Signal.fromString(buf.readString()); wasCoreDumped = buf.readBoolean(); // core dumped exitErrMsg = buf.readString(); sendClose(); } else super.handleRequest(req, buf); } catch (Buffer.BufferException be) { throw new ConnectionException(be); } }
@Override public void notifyError(SSHException error) { err.notifyError(error); super.notifyError(error); }
@Override protected void eofInputStreams() { err.eof(); // also close the stderr stream super.eofInputStreams(); }
@Override protected void closeAllStreams() { IOUtils.closeQuietly(err); super.closeAllStreams(); }