Skip to content

Instantly share code, notes, and snippets.

@bkeepers
Created September 20, 2010 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkeepers/588601 to your computer and use it in GitHub Desktop.
Save bkeepers/588601 to your computer and use it in GitHub Desktop.
trap :CLD do
puts "Reaped #{Process.wait}"
end
loop do
pid = fork { sleep 2 }
puts "Spawned #{pid}"
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment