diff options
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r-- | lib/unicorn.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index fa2ebe8..4e09b0c 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -120,7 +120,6 @@ module Unicorn "(or pid=#{path} is stale)" end File.open(path, 'wb') { |fp| fp.syswrite("#{$$}\n") } - at_exit { unlink_pid_safe(path) } end unlink_pid_safe(@pid) if @pid && @pid != path @pid = path @@ -220,6 +219,7 @@ module Unicorn end stop # gracefully shutdown all workers on our way out logger.info "master PID:#{$$} join complete" + unlink_pid_safe(@pid) if @pid end # Terminates all workers, but does not exit master process |