Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Puma hangs when it receives a SIGTERM in Linux x86_64. Reproduce as follows:
#
# Start Puma
# $ puma
#
# Get the PID for Puma
# $ ps u
#
# Send SIGTERM
# $ kill 4321
#
# Puma roughly does the following, which causes a hang in MRI and RBX. JRuby
# appears to handle this fine.
t = Thread.new{ sleep 3 } # lib/puma/server.rb:204
Signal.trap "SIGINT" do # lib/puma/cli.rb:427
t.join # lib/puma/server.rb:628
end
puts 'Press <ctrl> + c now'
t.join # in lib/puma/cli.rb:434
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.