attempt to rename PID file when possible
authorEric Wong <e@80x24.org>
Thu, 24 Oct 2013 22:11:17 +0000 (22:11 +0000)
committerEric Wong <normalperson@yhbt.net>
Thu, 24 Oct 2013 22:51:55 +0000 (22:51 +0000)
commit7d6ac0c17eb29a00a5b74099dbb3d4d015999f27
tree27229beaeb1f6c23b80b4de9d55ad17c51ac93c1
parentd90eebe1e50e2bdb9632b64591e4b84cbc0049a1
attempt to rename PID file when possible

This will preserve mtime on successful renames for comparisions.
While we're at it, avoid writing the new PID until the listeners are
inherited successfully.  This can be useful to avoid accidentally
clobbering a good PID if binding the listener or building the app
(preload_app==true) fails
lib/unicorn/http_server.rb