From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.229.49.16 with SMTP id t16cs73590qcf; Thu, 23 Sep 2010 17:36:13 -0700 (PDT) Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncCLiT7L3gBRD65O_kBBoEkGufAg@googlegroups.com designates 10.90.56.16 as permitted sender) client-ip=10.90.56.16; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncCLiT7L3gBRD65O_kBBoEkGufAg@googlegroups.com designates 10.90.56.16 as permitted sender) smtp.mail=rack-devel+bncCLiT7L3gBRD65O_kBBoEkGufAg@googlegroups.com; dkim=pass header.i=rack-devel+bncCLiT7L3gBRD65O_kBBoEkGufAg@googlegroups.com Received: from mr.google.com ([10.90.56.16]) by 10.90.56.16 with SMTP id e16mr2258652aga.27.1285288572966 (num_hops = 1); Thu, 23 Sep 2010 17:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received:received-spf:received:mime-version:received :received:date:message-id:subject:from:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=NUOXyZuvwwhOIIMu4q7SwaAGKilfhi73hiEkzE5J3Uo=; b=PkK7bteBluBB5vZWQLQTQwnfSMEgnUKhEL/cc57U8epjboSKm9cN6cAeYRNH9TkOFB jzl8UtBfo5XvwtVSsxGpGkcXDRh8HwzIkBoYPGkKmTyUG5o1v/3HJix8cm6SLol7Pju7 PlLEBJ5aYq/yxTWuNmZnyoMLiMnNxRTxbfzlA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:date:message-id:subject:from :to:x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type; b=Jlh6wFWw6+F1A1tL4we3qP7w4TVFMmT/SGwUMBTOZ3DMYDZuUZIdUQvIxQ5wJG+bIQ 5D8gK/wMtjvQe1mrFjsAlik3ifDJPQY6G37cr+p6105x6aSnN9ZZ4MdA+DLvTt1batmQ xuHmYGhV6lMn02gngr2CCbT44ewbr4rLC9oo0= Received: by 10.90.56.16 with SMTP id e16mr401796aga.27.1285288570013; Thu, 23 Sep 2010 17:36:10 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.90.17.28 with SMTP id 28ls1025094agq.6.p; Thu, 23 Sep 2010 17:36:09 -0700 (PDT) Received: by 10.150.51.1 with SMTP id y1mr737621yby.3.1285288569440; Thu, 23 Sep 2010 17:36:09 -0700 (PDT) Received: by 10.229.95.206 with SMTP id e14mr337609qcn.28.1285278735654; Thu, 23 Sep 2010 14:52:15 -0700 (PDT) Received: by 10.229.95.206 with SMTP id e14mr337608qcn.28.1285278735607; Thu, 23 Sep 2010 14:52:15 -0700 (PDT) Received: from mail-qy0-f180.google.com (mail-qy0-f180.google.com [209.85.216.180]) by gmr-mx.google.com with ESMTP id 2si766362qci.2.2010.09.23.14.52.14; Thu, 23 Sep 2010 14:52:14 -0700 (PDT) Received-SPF: pass (google.com: domain of andrew.bortz@gmail.com designates 209.85.216.180 as permitted sender) client-ip=209.85.216.180; Received: by mail-qy0-f180.google.com with SMTP id 5so3128175qyk.4 for ; Thu, 23 Sep 2010 14:52:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.34.210 with SMTP id m18mr1736700qad.301.1285278734214; Thu, 23 Sep 2010 14:52:14 -0700 (PDT) Received: by 10.229.72.224 with HTTP; Thu, 23 Sep 2010 14:52:14 -0700 (PDT) Date: Thu, 23 Sep 2010 14:52:14 -0700 Message-ID: Subject: Fix daemonize behavior broken since 1.0.1 From: Andrew Bortz To: rack-devel@googlegroups.com X-Original-Sender: andrew.bortz@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of andrew.bortz@gmail.com designates 209.85.216.180 as permitted sender) smtp.mail=andrew.bortz@gmail.com; dkim=pass (test mode) header.i=@gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=UTF-8 When rackup is run in daemonize mode, it fails to read the default config file. In fact, it accepts a config file argument, but unless that argument is an absolute path, it will also fail to load. The best way I can think of to fix that is to resolve the absolute path of the config file before the server is forked off (and chdir's to '/'). - Andrew diff --git a/lib/rack/server.rb b/lib/rack/server.rb index 8ef973c..edec62b 100644 --- a/lib/rack/server.rb +++ b/lib/rack/server.rb @@ -226,6 +226,7 @@ module Rack args.clear if ENV.include?("REQUEST_METHOD") options.merge! opt_parser.parse! args + options[:config] = ::File.expand_path(options[:config]) ENV["RACK_ENV"] = options[:environment] options end