guard / rb-inotify

A thorough inotify wrapper for Ruby using FFI.
MIT License
312 stars 64 forks source link

Fix fd leak in INotify::Notifier #26

Closed vongruenigen closed 11 years ago

vongruenigen commented 11 years ago

Currenty, there's a leak of file descriptors in the INotify::Notifier.watch() method class when calling it with the :recursive flag.

If a directory is opened via Dir.new() it should always be closed via Dir.close() afterwards, otherwise one file descriptor for each watched directory is leaked.