code: private void exit(int errorCode) {
  
          try {
              m_remoteShell.end();
          } catch (Exception e) {
              e.printStackTrace();
          }
          System.exit(errorCode);
      }
docs: Exits the shell with an error code, and if possible, notifies the remote shell that it is exiting.<p>
  
  @param errorCode the error code