diff --git a/src/watchdog/observers/inotify_c.py b/src/watchdog/observers/inotify_c.py index c018efb68..7cceb5f5c 100644 --- a/src/watchdog/observers/inotify_c.py +++ b/src/watchdog/observers/inotify_c.py @@ -248,6 +248,7 @@ def close(self): with self._lock: wd = self._wd_for_path[self._path] inotify_rm_watch(self._inotify_fd, wd) + os.close(self._inotify_fd) def read_events(self, event_buffer_size=DEFAULT_EVENT_BUFFER_SIZE): """