Report abuse

#!/usr/bin/ruby


%x{/usr/bin/touch /tmp/7777}

puts "executed ok"

puts "now doing with timeout"

require 'timeout'
status = Timeout::timeout(5) {
  %x{/usr/bin/touch /tmp/7777}
}