mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Be sure to only delete the pid in the master. Fixes #334
This commit is contained in:
parent
228edd90e0
commit
1cb7c7f785
1 changed files with 10 additions and 1 deletions
|
@ -235,7 +235,13 @@ module Puma
|
|||
f.puts Process.pid
|
||||
end
|
||||
|
||||
at_exit { delete_pidfile }
|
||||
cur = Process.pid
|
||||
|
||||
at_exit do
|
||||
if cur == Process.pid
|
||||
delete_pidfile
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -443,6 +449,9 @@ module Puma
|
|||
when :exit
|
||||
# nothing
|
||||
end
|
||||
|
||||
ensure
|
||||
delete_pidfile
|
||||
end
|
||||
|
||||
def setup_signals
|
||||
|
|
Loading…
Reference in a new issue