I
Ivan Samonov
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.
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.