Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible race condition when using InotifyTrees #68

Open
kiwy42 opened this issue Feb 18, 2019 · 0 comments
Open

Possible race condition when using InotifyTrees #68

kiwy42 opened this issue Feb 18, 2019 · 0 comments

Comments

@kiwy42
Copy link

kiwy42 commented Feb 18, 2019

Hello,
Thank you for this nice library it's really handy.
I think there could be race condition when using InotifyTrees().
The function build a list to use add_watch() on however as add_watch() do not check if the file or folder exists before adding the watch, it could crash in the process.
I happen to have a huge folder that is being watch but this race condition could happen.
I think there could be 2 possible solutions:

  • maybe add a check in add_watch() if file/folder exists
  • add a boolean to ignore missing folder and continue the instantiation when using InotifyTrees().
    What do you think about this ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant