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:
parent
791cd4af97
commit
d012f92c53
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue