Skip to content

Instantly share code, notes, and snippets.

@kjs3
Created August 31, 2013 22:29
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 kjs3/6401062 to your computer and use it in GitHub Desktop.
Save kjs3/6401062 to your computer and use it in GitHub Desktop.
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