class Puma::Cluster::Worker
def spawn_worker(idx)
def spawn_worker(idx) @config.run_hooks(:before_worker_fork, idx, @log_writer, @hook_data) pid = fork do new_worker = Worker.new index: idx, master: master, launcher: @launcher, pipes: { check_pipe: @check_pipe, worker_write: @worker_write }, server: @server new_worker.run end if !pid log "! Complete inability to spawn new workers detected" log "! Seppuku is the only choice." exit! 1 end @config.run_hooks(:after_worker_fork, idx, @log_writer, @hook_data) pid end