Shell.GetExitCode Method
Namespace: Rebex.TerminalEmulation
Assembly: Rebex.Terminal.dll (version 7.0.9083)
GetExitCode()
Gets the exit code of the last command, if available.///
Only supported in Shell instances initialized by
Ssh.StartCommand(string)
method
or Ssh.StartShell(ShellMode.WellKnownShell)
method.
Not supported in Shell instances initialized via Telnet
class.
Declaration
public int GetExitCode()
Returns
Type | Description |
---|---|
Int32 |
Remarks
The exit code is reported by the server after the command has finished. Therefore, make sure to the fully read the server response before calling the GetExitCode() method.