Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

Shell.GetExitCode Method

Namespace: Rebex.TerminalEmulation
Assembly: Rebex.Terminal.dll (version 8.0.9673)

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.

In This Article
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies