1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Detect and commit seppuku. Fixes #529

This commit is contained in:
Evan Phoenix 2016-04-07 11:41:53 -07:00
parent 791cd4af97
commit d012f92c53

View file

@ -118,6 +118,12 @@ module Puma
@launcher.config.run_hooks :before_worker_fork, idx
pid = fork { worker(idx, master) }
if !pid
log "! Complete inability to spawn new workers detected"
log "! Seppuku is the only choice."
exit! 1
end
debug "Spawned worker: #{pid}"
@workers << Worker.new(idx, pid, @phase, @options)