-
Notifications
You must be signed in to change notification settings - Fork 64
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
WatchDescriptor
usage is not safe
#61
Comments
I've been trying to wrap my had around #61, but I can't figure out how to implement a solution while keeping the low level binding/wrapper nature of this library intact. The wraparound issue is actually an Inotify issue, not an issue with this library. On the other hand, I do feel that if the library doesn't implement a solution for this issue, it should at least expose it to the user space in some way. Maybe this is beyond my current skill level, but I'm learning a fair deal trying to solve this. |
I currently don't have a full grasp on these issues, and haven't thought of elegant solutions for any of them. If we can solve them without introducing too much overhead on top of inotify, I think we should. I need to put more thought into this (and read up on the man pages!) before I can say more. Unless we find obvious solutions to those problems, it might be a good idea to bring the notify developers into the discussion, to figure out what should be solved in inotify-rs and what they handle in higher-level code anyway. In any case, I think the documentation should be more explicit about this stuff. It should state that inotify-rs is a low-level wrapper, it should point to notify as a possibly better alternative for application developers, and it should explicitely list any inotify gotchas that are not being handled by inotify-rs. |
Yes, the documentation should reflect this issue. As an aside, is it possible to implement compile time warnings in rust? |
Yes, that's possible by writing a compiler plugin. Clippy is a tool that does this. |
The quoted text above contains three distinct complaints that I'm going to address separately.
Yes, and I don't know how there could be. What we can do, though, is to prevent a
This is a legitimate concern. I've opend issue #73.
I'm not sure, but I don't think this would make any sense. I've recorded my thoughts in issue #74. Since there are more focused issues now for each of the complaints, I'm closing this one. |
From Stack Overflow:
The text was updated successfully, but these errors were encountered: