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

Archive Index This month's Index

Subject: Re: libssh2_channel_get_exit_status (Daniel Stenberg)

Re: libssh2_channel_get_exit_status (Daniel Stenberg)

From: aalok sood <aalok_at_ideadevice.com>
Date: Mon, 16 Jul 2012 15:45:17 +0530

Yes Daniel I agree with you.

It would be better than modifying libssh2_channel_get_exit_status.
Also keeping the fetch status in a separate field from the actual shell
exit_status would be a better, more clear api.

I will add the api and send in a patch.

-(Aalok)-

> Message: 2
> Date: Sun, 15 Jul 2012 23:55:36 +0200 (CEST)
> From: Daniel Stenberg <daniel_at_haxx.se>
> To: libssh2 development <libssh2-devel_at_cool.haxx.se>
> Subject: Re: libssh2_channel_get_exit_status
> Message-ID: <alpine.DEB.2.00.1207152353050.5683_at_tvnag.unkk.fr>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> 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_API int
> 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 mailing list
> libssh2-devel_at_cool.haxx.se
> http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>
>
> End of libssh2-devel Digest, Vol 38, Issue 7
> ********************************************
>

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

the libssh2 team