Skip to content

Instantly share code, notes, and snippets.

@kjs3 kjs3/gist:6401062
Created Aug 31, 2013

Embed
What would you like to do?
fork is making irb unresponsive
# This makes irb sluggish and randomly unresponsive
if fork
puts "Hello from parent process #{Process.pid}"
else
puts "Hello from child process #{Process.pid}"
# I thought the child process would exit automatically here?
end
# This works fine
if fork
puts "Hello from parent process #{Process.pid}"
else
puts "Hello from child process #{Process.pid}"
exit
end
# back to parent irb process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.