class Puma::Cluster

def spawn_workers

def spawn_workers
  diff = @options[:workers] - @workers.size
  return if diff < 1
  master = Process.pid
  if @options[:fork_worker]
    @fork_writer << "-1\n"
  end
  diff.times do
    idx = next_worker_index
    if @options[:fork_worker] && idx != 0
      @fork_writer << "#{idx}\n"
      pid = nil
    else
      pid = spawn_worker(idx, master)
    end
    debug "Spawned worker: #{pid}"
    @workers << WorkerHandle.new(idx, pid, @phase, @options)
  end
  if @options[:fork_worker] && all_workers_in_phase?
    @fork_writer << "0\n"
  end
end