Subject: Re: Command execution end

Re: Command execution end

From: Peter Stuge <peter_at_stuge.se>
Date: Tue, 4 Aug 2009 17:01:39 +0200

vti wrote:
> > RFC 4254 says to send SSH_MSG_CHANNEL_CLOSE. _channel_send_eof()
> > should be used only internally in libssh2. Maybe also marked that
> > way in the API somehow? Yes, might break ABI.
> >
> > Please try _channel_close() and _channel_wait_closed() instead.
>
> I tried all that before writing to the list =/ No success.

So a few emails could have been saved if you had mentioned that. What
else have you tried?

Could you provide a minimal program demonstrating the problem?

> while (libssh2_channel_close(channel) == LIBSSH2_ERROR_EAGAIN);
> while (libssh2_channel_wait_closed(channel) == LIBSSH2_ERROR_EAGAIN);

Ok. Do you know if at least _close() returns quickly?

> From the manual page:
> .. sending an SSH_MSG_CLOSE packet to the remote host ..
>
> Is SSH_MSG_CLOSE is the same as SSH_MSG_CHANNEL_CLOSE?

Yes, that's an error in the man page.

What happens on the server side? strace? sshd -ddd?

And of course, try to enable libssh2 debugging.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2009-08-04