From: Boris Klug <boris.klug@de...> - 2007-10-09 09:45:31
We execute unix commands using a channel of the type
SSHChannel.EXEC_CHANNEL_TYPE. After exec we read the reply and than call
channel.getExitStatus(). Most times we get the result of the command but
in some situations we get -1 which does NOT come from the executed commands.
I managed to create a test environment so that the -1 case happends in
about 20% of all runs.
The -1 is the default value for the exit-code in the class
com.jcraft.jsch.Channel so I the real exit code of our command is never set.
My question is: What can I do to get the real command exit code all the
Thanks for your help in advance.
Get latest updates about Open Source Projects, Conferences and News.