code: def acquire_pidfile(rundir, process_type=PROCESS_TYPE, name=None):
      
      from feat.common.run import get_pidpath
      _ensure_dir(rundir, "rundir")
      path = get_pidpath(rundir, process_type, name)
      return open(path, 'w')
docs: Open a PID file for writing, using the given process type and
      process name for the filename. The returned file can be then passed
      to writePidFile after forking.
  
      @rtype:   str
      @returns: file object, open for writing