Sha256: 6ce42a3ce9cd6c7b95b34162537098f5234e06a9a33040b7faf2d1b07b7fa528
Contents?: true
Size: 1.49 KB
Versions: 5
Compression:
Stored size: 1.49 KB
Contents
###################################################### # # **** DO NOT EDIT **** # # **** THIS IS A GENERATED FILE ***** # ###################################################### module Rake::CompTree module RetriableFork HAVE_FORK = lambda { begin process_id = fork { } Process.wait(process_id) rescue NotImplementedError return false end true }.call def fork(retry_wait = 10, retry_max = 10, &block) num_retries = 0 begin Process.fork(&block) rescue Errno::EAGAIN num_retries += 1 if num_retries == retry_max message = %Q{ **************************************************************** Maximum number of EAGAIN signals reached (#{retry_max}) **************************************************************** Either increase your process limit permission (consult your OS manual) or run this script as superuser. **************************************************************** } STDERR.puts(message.gsub(%r!^[ \t]+!, "")) raise end STDERR.puts "Caught EGAIN. Retrying in #{retry_wait} seconds." sleep(retry_wait) retry end end module_function :fork end end ###################################################### # # **** DO NOT EDIT **** # # **** THIS IS A GENERATED FILE ***** # ######################################################
Version data entries
5 entries across 5 versions & 1 rubygems