<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def trigger_pull(queue, ignore_listener=False, trigger=_c.FSQ_TRIGGER):
    '''Write a non-blocking byte to a trigger fifo, to cause a triggered
       scan'''
    fd = None
    trigger_path = fsq_path.trigger(queue, trigger=trigger)
    _queue_ok(os.path.dirname(trigger_path))
    try:
        fd = os.open(trigger_path,
                     os.O_NDELAY|os.O_NONBLOCK|os.O_APPEND|os.O_WRONLY)
        os.write(fd, '\0')
    except (OSError, IOError, ), e:
        if e.errno != errno.ENXIO:
            if e.errno != errno.EAGAIN and e.errno != errno.EWOULDBLOCK:
                raise FSQTriggerPullError(e.errno, wrap_io_os_err(e))
        elif not ignore_listener:
            raise FSQTriggerPullError(e.errno, u'No listener for:'\
                                      u' {0}'.format(trigger_path))
    finally:
        if fd is not None:
            os.close(fd)