Vivek Nallur
2007-Feb-05 16:11 UTC
[Net-ssh-users] channel.send_signal always returns failed
Hi,
I''m trying to send a signal (SIGINT) to a couple of processes started
asynchronously, but they always return failed. The code looks like
this:
def run_executable (session, executable, args)
session.open_channel do |channel|
channel.on_data do |ch, data|
puts "[#{ch}] ==> #{data}"
channel.send_signal(''INT'', true)
end
channel.on_failure do |ch|
puts "#{ch} failed"
end
channel.on_success do|ch|
puts "#{ch} successfully opened"
end
channel.exec "#{executable} #{args}"
end
end
What am I doing wrong?
-Vivek