vicent roca daniel wrote:
> libssh2_channel_exec() always returns 0 when I executed it.
That means that the server forked a process which will try to execute
the specified command.
> It doesn mather if i put libssh2_channel_exec("ls)
> o libssh2_channel_exec("blahblablah").
>
> I'd like to know if the command is executed. Is possible??
Look for the exit-status message from the server. See
libssh2_channel_get_exit_status(). Note that you only get the exit
status *after* the command has exited on the server. You need to read
from the channel until it returns an error, and *then* check the exit
status.
//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-08-04