in chefctl/src/chefctl.rb [367:406]
def stop_or_wait_for_chef(logfile = false)
return if chefctl_procs.empty?
return if logfile && !File.exist?(logfile)
client_name = File.basename(chef_client_binary)
if chefctl_procs.length < 15
STDOUT.sync = true
unless chefclient_procs.empty?
STDOUT << "Waiting for #{client_name} runs to complete "
until chefclient_procs.empty?
STDOUT << '.'
sleep 5
end
STDOUT << "\nChef-client runs completed.\n"
end
STDOUT.sync = false
procs = chefctl_procs
unless procs.empty?
Chefctl.logger.debug('Killing other chefctl processes: ' +
procs.join(' '))
kill_processes(procs)
end
else
quit 'Several chef runs already queued. Not queueing any more.', 0
end
end