Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Break the loop after being signaled

I'm pretty sure this would fix #12. However, I'm not sure what the
reproducer for #12 was, so I'm going to hold off until I have one.
  • Loading branch information...
commit 3899505379ec6497f7f4b892f8754c363c89f08a 1 parent 230054b
@gdb gdb authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/einhorn/command/interface.rb
View
3  lib/einhorn/command/interface.rb
@@ -150,10 +150,12 @@ def self.install_handlers
Signal.trap("INT") do
Einhorn::Command.signal_all("USR2", Einhorn::WorkerPool.workers)
Einhorn::State.respawn = false
+ Einhorn::Event.break_loop
end
Signal.trap("TERM") do
Einhorn::Command.signal_all("TERM", Einhorn::WorkerPool.workers)
Einhorn::State.respawn = false
+ Einhorn::Event.break_loop
end
# Note that quit is a bit different, in that it will actually
# make Einhorn quit without waiting for children to exit.
@@ -168,6 +170,7 @@ def self.install_handlers
Signal.trap("USR2") do
Einhorn::Command.signal_all("USR2", Einhorn::WorkerPool.workers)
Einhorn::State.respawn = false
+ Einhorn::Event.break_loop
end
at_exit do
if Einhorn::State.kill_children_on_exit && Einhorn::TransientState.whatami == :master
Please sign in to comment.
Something went wrong with that request. Please try again.