You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: core.rb
    path of file: ./repos/rubocop/lib/rubocop/server
    
    the code of the file until where you have to start completion: # frozen_string_literal:
    
      def detach_server
        write_port_and_token_files

        pid = fork do
          Process.daemon(true)
          $stderr.reopen(Cache.stderr_path, 'w')
          process_input
        end

        Process.waitpid(pid)
      end