This project is archived and is in readonly mode.

#4531 ✓resolved
AGuyNamedRyan

[PATCH] Pass rack the absolute path of server's pid file

Reported by AGuyNamedRyan | May 4th, 2010 @ 08:13 PM

The command "rails server --daemon" fails silently and dies under ruby < 1.9

As mentioned here in a closed rack ticket, rack will chdir to "/" when running as a daemon. Rails uses "tmp/pids/server.pid", a relative path, as the path to the pid file. Once rack has daemonized and chdir to "/", this path is invalid and the process dies silently.

I've attached a patch which uses the absolute path of the pid file instead of the path relative to the root of the rails app.

The aforementioned ticket mentions that the config argument should also be an absolute path, but I didn't need to make that change in order for "rails server -d" to work.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Tags

Pages