rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
* Fix daemonize behavior broken since 1.0.1
@ 2010-09-23 21:52 Andrew Bortz
  2010-09-24 14:15 ` James Tucker
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Bortz @ 2010-09-23 21:52 UTC (permalink / raw)
  To: rack-devel

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-28  5:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).