login about faq

What is the 'exit status' returned by CkSsh_GetChannelExitStatus(). I want to run a program on a remote machine using CkSsh_SendReqExec() and get the program's exit code when it completes (the number passed to exit(n)). Is the number returned by CkSsh_GetChannelExitStatus() the exit code I'm looking for?

asked May 12 '17 at 07:06

chilkat's gravatar image

chilkat ♦♦

Yes and no.

If you are calling SendReqExec, then the SSH channel is running your program directly, and in this case the exit status of your program is the exit status of the SSH channel.

If you started a shell session, and you're running your program via the remote shell, then No. The channel exit status is the exit status of the shell program (it is the remote shell that would receive the exit status of your program).


answered May 12 '17 at 07:09

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: May 12 '17 at 07:06

Seen: 1,637 times

Last updated: May 12 '17 at 07:09

powered by OSQA