Subject: Re: libssh2_channel_get_exit_status

Re: libssh2_channel_get_exit_status

From: Daniel Stenberg <>
Date: Sun, 15 Jul 2012 23:55:36 +0200 (CEST)

On Sun, 15 Jul 2012, aalok sood wrote:

> * libssh2_channel_get_exit_status
> Now this makes sense, but sending back zero seems peculiar to me. zero is a
> valid shell exit code, so we should send back something out of valid shell
> exit codes in case channel is None. How about -1?

We should rather make a new function that has a prototype like:

  libssh2_channel_get_exit_status2(LIBSSH2_CHANNEL *channel, uint32_t *status)

Which then can return the proper value from the protocol in a value separate
from the return code. Wouldn't that work fine for you?

Received on 2012-07-15