I want to make a system call in ruby, but instead of waiting for the process to complete, I want my script to continue to work.
system
What is the recommended way to handle this?
You can use Process.spawn .
Process.spawn
Once the process is created, you can either wait for the process to complete (using waitpid ) or detach .
waitpid
detach
See IO#popen in the standard library.
IO#popen
f = IO.popen("date") f.gets # => "Wed Aug 10 14:56:59 MDT 2011\n" f.close