On 01.06.2009 12:09, Ivan Samonov wrote:
> I use net/ssh library.
> My code:
> require 'rubygems'
> require 'net/ssh'
> Net::SSH.start('server', 'login') { |ssh| ssh.open_channel { |ch|
> ch.exec('false') { |ch, success| puts success }  } }
> "false" is a console program and it always return 1.
> Why result of this program is "true"?  What mean "success" here? I think
> I misunderstand something.

This is likely because SSH does not propagate the result of the remote 
process.  You can find the details on SSH's manpage.

One way would be to send something like

echo "$?"

as last command and read this.

Kind regards

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/