Re: [BUG] Using inotify on /proc/partitoins

2013-06-13 Thread Al Viro
On Fri, Jun 14, 2013 at 09:26:49AM +0800, majianpeng wrote: > Hi all, > I wanted to monitor /proc/partitions using inotify. That, indeed, is a bug. Easily fixed - don't do that. > But when i call 'cat /proc/partitions',the program can't return. > So i added some message in kernel in order

[BUG] Using inotify on /proc/partitoins

2013-06-13 Thread majianpeng
Hi all, I wanted to monitor /proc/partitions using inotify.Although now i know it can't catch the event of write. But for read,it can't catch. The code is: int main() { int fd = inotify_init(); int wd; char buff[4096]; int ret; if (fd < 0)