1
0
Fork 0
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:
Evan Phoenix 2013-07-18 09:26:26 -07:00
parent 228edd90e0
commit 1cb7c7f785

View file

@ -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