Created
April 19, 2013 02:38
-
-
Save benweint/5417722 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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