Re: external programs

BenH
Wed, 15 Apr 2009 15:15:15 -0000

you may try something along this line:

timeout(10) do
  %x{sleep 12}
end

rescue Timeout::Error
  # Do something to handle the time out.
  puts "The sleep command timed out"
end

Hope that gets you going in a good direction.
BenH

On Apr 15, 7:41 am, Svetlana Vt
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
> how i can follow to execute external programs: define, that they
don''t
> hung with Kernel method system or another? may be use timeout?
>
> excuse me for my bad english :)
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com