Subject: [libssh2] [ libssh2-Bugs-1875397 ] libssh2_channel_get_exit_status should not fail with 0

[libssh2] [ libssh2-Bugs-1875397 ] libssh2_channel_get_exit_status should not fail with 0

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sat, 19 Jan 2008 11:42:23 -0800

Bugs item #1875397, was opened at 2008-01-19 10:40
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1875397&group_id=125852

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: API
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Neil Gierman (roadrunn)
Assigned to: Nobody/Anonymous (nobody)
Summary: libssh2_channel_get_exit_status should not fail with 0

Initial Comment:
When using libssh2_channel_get_exit_status to check the return code of an exec'ed process it returns 0 on failure. The problem is most applications and scripts will return 0 on success. I think tht if libssh2_channel_get_exit_status has a failure it should return -1, or some other value that wouldn't be confused with the exec'ed process' return code. I think if we at least stay away from 0 and 1 that would be a good start.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2008-01-19 11:42

Message:
Logged In: NO

The only reliable option is to signal failure, or the return status, out
of band. Compare how the waitpid() system call works.

//Peter

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1875397&group_id=125852

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2008-01-19