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

Archive Index This month's Index

Subject: Re: libssh2_channel_close/libssh2_channel_free hangs if you execute long-running command

Re: libssh2_channel_close/libssh2_channel_free hangs if you execute long-running command

From: Peter Stuge <peter_at_stuge.se>
Date: Fri, 14 Oct 2011 05:48:23 +0200

Pavel Strashkin wrote:
> > Of course not, when the remote program still has the channel open?
>
> Remote or local doesn't matter. It's just a pipe.

It is certainly not a pipe; it is an SSH channel. Please read up on
the SSH RFCs to learn the details of channels.

> Actually, channel is closed after [interval] seconds. The question
> is why it waits for anything to read before closing.

Well - maybe you can find out?

> > A proper solution would of course be to first kill the remote
> > program. Maybe you will not bother.
>
> I don't mind to do it, but i don't have necessary tools. There is no
> kill or similar function in a library.

Please send a patch for libssh2 that adds support for sending
signals.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-10-14

the libssh2 team