1 2 3 4 5 6 7 8 9 10 11 12 13 |
#!/usr/bin/ruby %x{/usr/bin/touch /tmp/7777} puts "executed ok" puts "now doing with timeout" status = Timeout::timeout(5) { %x{/usr/bin/touch /tmp/7777} } |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#!/usr/bin/ruby %x{/usr/bin/touch /tmp/7777} puts "executed ok" puts "now doing with timeout" status = Timeout::timeout(5) { %x{/usr/bin/touch /tmp/7777} } |