[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 10 Oct 2012 15:58:28 +0600
From: Марк Коренберг
<socketpair@...il.com>
To: linux-kernel@...r.kernel.org
Subject: inotify: IN_IGNORED is not sent
Suppose this code:
i = inotify_init1(IN_CLOEXEC);
wd = inotify_add_watch(i, "/tmp/target2", IN_ATTRIB);
for(;;) {
read (wd, ...);
inotify_rm_watch(i, wd); // FAIL HERE
wd = inotify_add_watch(i, "/tmp/target2", IN_ATTRIB);
}
Now, in shell:
$ :> /tmp/jjj
$ mv /tmp/jjj /tmp/target2
In that case IN_IGNORED is not sent, but wd previously added by
inotify_add_watch() become invalid, so, trying to call
inotify_rm_watch() failed with EINVAL.
--
Segmentation fault
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists