You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement libssh ssh_channel_get_exit_state in Channel object #73
libssh exit_status is only set by the exit-status packet/request, which is only sent for regular process exits. If the remote process exits due to a signal, an exit-signal request is sent instead, which doesn't set exit-status (which then remains at -1).
I'm halfway between
"this kinda sounds like a libssh bug, ssh_channel_get_exit_status should return the standard unixy composite, like wait(2) does"
and
"I guess we have to add a default callback for this and add a separate Channel.get_exit_signal function."
changed the title [-]channel_signal_function for handling when request_exec process dies from signal[/-][+]Implement libssh ssh_channel_get_exit_state in Channel object[/+]on Oct 5, 2025
Activity
pkittenis commentedon Oct 5, 2025
The answer here is "neither".
This library should not diverge from libssh implementation, whether any developers agree with that implementation or not.
The scope of this library is to provide bindings for libssh, not to change its functionality.
libssh provides
ssh_channel_get_exit_state()for getting process exit state, including signal.Library should implement that function.
[-]channel_signal_function for handling when request_exec process dies from signal[/-][+]Implement libssh ssh_channel_get_exit_state in Channel object[/+]