Navigation Menu

Skip to content

Commit

Permalink
droonga-engine: return non success exit status for unexpected exit
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 22, 2014
1 parent 37e4386 commit a6edac7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/droonga/engine/command/droonga_engine.rb
Expand Up @@ -167,14 +167,21 @@ def run_main_loop
running = false
end

succeeded = true
while running
service_pid = run_service
_, status = Process.waitpid2(service_pid)
break if status.nil?
break unless status.success?
if status.nil?
succeeded = false
break
end
unless status.success?
succeeded = false
break
end
end

true
succeeded
end
end

Expand Down

0 comments on commit a6edac7

Please sign in to comment.