Thanks for your kindly help. This real help me.I will have a try. And my 
understand, actually two channels in the same session will never be used 
simultaneously. Is it right?
 Mutex sessionA
 handle channle1(such as open, read, exec...)
 unmutex
  
 Mutex sessionA
 handle channle2(such as open, read, exec...)
 unmutex




------------------ Original ------------------
From: "Peter Stuge"; 
Date: 2013??9??13??(??????) ????6:34
To: "libssh2-devel"; 
Subject: Re: problems on closing channel



Peter wrote:
> thread1 open a channel and then run command(such as ping) as I
> mentioned above. And thread2 open another channel run command
> such as "killall ping" to terminate the command.

Besides the mutex, consider what happens when your program runs two
or more times using the same account on a remote server.

If you need reliable remote process management then you must
implement a service which does this for you, that runs on the remote
server. SSH does not solve that problem for you, you have to do that
yourself.


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
.
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to