|
Bugzilla – Full Text Bug Listing |
| Summary: | inotify: IN_IGNORED is sent although unlinked file is not watched anymore | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE LINUX 10.0 | Reporter: | Gernot Payer <gpayer> |
| Component: | Kernel | Assignee: | Robert Love <rml> |
| Status: | RESOLVED INVALID | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | Beta 1 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | All | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
You will get an IN_IGNORED event when you remove the watch. So, unless you are seeing TWO such events, this is not a bug. I'm sorry, but this behaviour makes absolutely no sense to me. When I remove a watch, then I don't want to get any further events about that file/dir. You might also want to describe this behaviour in the documentation. It is consistent: You get an IN_IGNORED event whenever an event is removed, regardless of how. Also, it lets applications handle event removal in a single place, their IN_IGNORED handler. |
When doing this wd = inotify_add_watch(fd, "file", IN_ACCESS); (do stuff with "file") inotify_rm_watch(fd, wd); close(file_fd); unlink("file"); there is still an IN_IGNORED event pending in fd, although "file" is deleted after the watch has been removed. I don't think this is the intended behaviour.