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

If a watched directory disappears, the watchers should be renewed. #19

Open
itkovian opened this issue Jun 13, 2019 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@itkovian
Copy link
Owner

Watchers are registered with the kernel, but if the directory vanishes, the watcher stops getting notification for the FD it is subscribed for. The FD for the new directory is obviously different, meaning that we are now not watching that directory.

A fix could be to watch a removal event of the watched directory. For this, we probably need an extra watcher that will signal the threads to cease operations and restart them, while waiting for the new directories to become available.

If this happens frequently, it might induce a race condition, where we ask to watch locations that have since disappeared again. It should be OK to quit with an error in this case.

@itkovian itkovian added the enhancement New feature or request label Jun 13, 2019
@itkovian itkovian self-assigned this Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant