class Puma::Launcher

def write_pid

to a file.
If configured, write the pid of the current process out
def write_pid
  path = @options[:pidfile]
  return unless path
  File.open(path, 'w') { |f| f.puts Process.pid }
  cur = Process.pid
  at_exit do
    delete_pidfile if cur == Process.pid
  end
end