    # File lib/merb-core/bootloader.rb, line 826
        def reap_workers(status = 0, sig = reap_workers_signal)

          Merb.logger.info "Executed all before worker shutdown callbacks..."
          Merb::BootLoader.before_worker_shutdown_callbacks.each do |cb|
            begin
              cb.call
            rescue Exception => e
              Merb.logger.fatal "before worker shutdown callback crashed: #{e.message}"
            end

          end

          Merb.exiting = true unless status == 128

          begin
            if @writer
              @writer.puts(status.to_s)
              @writer.close
            end
          rescue SystemCallError
          end

          threads = []

          ($WORKERS || []).each do |p|
            threads << Thread.new do
              begin
                Process.kill(sig, p)
                Process.wait2(p)
              rescue SystemCallError
              end
            end
          end
          threads.each {|t| t.join }
          exit(status)
        end