Navigation Menu

Skip to content

Commit

Permalink
droonga-engine: support immediate restart
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 22, 2014
1 parent 52c52d5 commit c23d433
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/droonga/engine/command/droonga_engine.rb
Expand Up @@ -181,6 +181,11 @@ def run_main_loop
Process.kill(Signals::GRACEFUL_STOP, old_service_pid)
end
end
trap(Signals::IMMEDIATE_RESTART) do
old_service_pid = service_pid
service_pid = run_service
Process.kill(Signals::IMMEDIATE_STOP, old_service_pid)
end

succeeded = true
while running
Expand Down

0 comments on commit c23d433

Please sign in to comment.