class Shotgun::Loader

def proceed_as_child

def proceed_as_child
  boom = false
  @reader.close
  status, headers, body = assemble_app.call(@env)
  Marshal.dump([:ok, status, headers.to_hash], @writer)
  spec_body(body).each { |chunk| @writer.write(chunk) }
  body.close if body.respond_to?(:close)
rescue Object => boom
  Marshal.dump([
    :error,
    "#{boom.class.name}: #{boom.to_s}",
    boom.backtrace
  ], @writer)
ensure
  @writer.close
  exit! boom ? 1 : 0
end