www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: libssh2_channel_get_exit_status

Re: libssh2_channel_get_exit_status

From: Daniel Stenberg <daniel_at_haxx.se>
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?

  / daniel.haxx.se
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-07-15

the libssh2 team