2 # if a block is specified then it is passed the child pid and run in a
3 # background thread. note that this thread will __not__ be blocked during the
4 # execution of the command so it may do useful work such as killing the child
5 # if execution time passes a certain threshold
9 looper = %q( ruby -e" loop{ STDERR.puts Time.now.to_i; sleep 1 } " )
11 status, stdout, stderr =
12 systemu looper do |cid|