pyinotify
pyinotify copied to clipboard
Shouldn't call close on already closed fd...
If WatchManager.close() is called twice then bad things can happen :) Also if WatchManager.close() is called then Notifier.stop() the same thing can happen. Basically, there needs to be a well defined lifetime/ownership for the fd otherwise we can start randomly closing the fd's belonging to other objects which don't expect it.
Maybe context managers would be nice too, that'd make it clear.