Skip to content

Instantly share code, notes, and snippets.

@benweint
Created April 19, 2013 02:38
Show Gist options
  • Save benweint/5417722 to your computer and use it in GitHub Desktop.
Save benweint/5417722 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'logger'
logger = Logger.new("/dev/null")
logger_thread = Thread.new do
loop do
logger.debug("hey" * 80)
sleep 0.01
end
end
loop do
logger.debug("about to fork")
Process.fork do
puts "child #{$$}"
logger.debug("forked")
end
Process.wait
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment