rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Andrew Bortz <andrew.bortz@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Re: Fix daemonize behavior broken since 1.0.1
Date: Mon, 27 Sep 2010 22:41:28 -0700 (PDT)	[thread overview]
Message-ID: <ed387c3e-e048-4ae2-8d01-dda7c3599581@x18g2000pro.googlegroups.com> (raw)
In-Reply-To: <6C0F22B1-AC07-4624-9133-388CD00297D8@gmail.com>

Yup, you did (in a different way) and I totally missed it. Thanks!

- Andrew

On Sep 24, 7:15 am, James Tucker <jftuc...@gmail.com> wrote:
> iirc, I fixed this in master already.
>
> On 23 Sep 2010, at 18:52, Andrew Bortz wrote:
>
>
>
>
>
>
>
> > 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

      reply	other threads:[~2010-09-28  5:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23 21:52 Fix daemonize behavior broken since 1.0.1 Andrew Bortz
2010-09-24 14:15 ` James Tucker
2010-09-28  5:41   ` Andrew Bortz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed387c3e-e048-4ae2-8d01-dda7c3599581@x18g2000pro.googlegroups.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).