Example #1
0
 @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);
   }
 }
Example #2
0
 @Override
 public void notifyError(SSHException error) {
   err.notifyError(error);
   super.notifyError(error);
 }
Example #3
0
 @Override
 protected void eofInputStreams() {
   err.eof(); // also close the stderr stream
   super.eofInputStreams();
 }
Example #4
0
 @Override
 protected void closeAllStreams() {
   IOUtils.closeQuietly(err);
   super.closeAllStreams();
 }