docs: def trigger(queue, user=None, group=None, mode=None, trigger=_c.FSQ_TRIGGER):
      '''Installs a trigger for the specified queue.'''
      # default our owners and mode
      user, group, mode = _dflts(user, group, mode)
      trigger_path = fsq_path.trigger(queue, trigger=trigger)
      created = False
      try:
          # mkfifo is incapable of taking unicode, coerce back to str
          try:
              os.mkfifo(trigger_path.encode(_c.FSQ_CHARSET), mode)
              created = True
          except (OSError, IOError, ), e:
              # if failure not due to existence, rm and bail
              if e.errno != errno.EEXIST:
                  raise e
  
          # don't open and fchown here, as opening WRONLY without an open
          # reading fd will hang, opening RDONLY will zombie if we don't
          # flush, and intercepts triggers meant to go elsewheres
          os.chmod(trigger_path, mode)
          if user is not None or group is not None:
              os.chown(trigger_path, *uid_gid(user, group, path=trigger_path))
      except (OSError, IOError, ), e:
          # only rm if we created and failed, otherwise leave it and fail
          if created:
              _cleanup(trigger_path, e)
          _raise(trigger_path, e)