1 2 3 4 5 6 7 8 9 10 11
# Do it the blocking way system 'sleep 5' # Do it the non-blocking way Process.spawn 'sleep 5' # Do it the blocking way with Process.spawn # Notice that it returns the pid of the child process pid = Process.spawn 'sleep 5' Process.waitpid(pid)