pyinotify icon indicating copy to clipboard operation
pyinotify copied to clipboard

Shouldn't call close on already closed fd...

Open giannitedesco opened this issue 5 years ago • 1 comments

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.

giannitedesco avatar May 01 '19 13:05 giannitedesco

Maybe context managers would be nice too, that'd make it clear.

giannitedesco avatar May 01 '19 13:05 giannitedesco