Skip to content

Instantly share code, notes, and snippets.

@stevedev
Created July 24, 2013 17:14
Show Gist options
  • Save stevedev/6072516 to your computer and use it in GitHub Desktop.
Save stevedev/6072516 to your computer and use it in GitHub Desktop.
process = fork do
File.open('./output.txt', 'w') do |f|
20.times do |i|
f.write "Tick #{i}\n"
f.flush
sleep 1
end
end
end
Process.detach(process)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment