seb-m/pyinotify — Issue #27: IN_Q_OVERFLOW events aren't processed at all
Author: TomiBelan
Created: 2011-12-01 20:01:09+00:00
State: open

Because of this condition in process_events():

watch_ = self._watch_manager.get_watch(raw_event.wd)
if watch_ is None:
# Not really sure how we ended up here, nor how we should
# handle these types of events and if it is appropriate to
# completly skip them (like we are doing here).
log.warning("Unable to retrieve Watch object associated to %s",
repr(raw_event))
continue

events of type `IN_Q_OVEFLOW` (which always have wd==-1) are never processed, not even by `_SysProcessEvent`.

The commit that added the above code doesn't go into much detail as to why it was added. Perhaps a misguided optimization attempt? It might be the case that it can be removed entirely. (If not, the best option would probably be to make a special case for `raw_event.mask & IN_Q_OVERFLOW` or maybe `raw_event.wd == -1`.)