public override void Cancel() { kill(); channel.sendSignal("TERM"); channel.disconnect(); }
protected override void RunOperations() { try { channel = Ssh.GetChannel(command); channel.setErrStream(new TextStream(stdErr)); channel.setOutputStream(new TextStream(stdOut)); channel.connect(); while (!channel.isEOF()) { Thread.Sleep(200); } channel.disconnect(); } finally { ExitCode = channel.getExitStatus(); } }
public override void Close() { base.Close(); if (_channel != null) { try { if (_channel.isConnected()) { _channel.disconnect(); } } finally { _channel = null; } } }
public override void Close() { base.Close(); if (_channel == null) { return; } try { _exitStatus = _channel.getExitStatus(); if (_channel.isConnected()) { _channel.disconnect(); } } finally { _channel = null; } }