Handling of asynchronous events---reference
There are many problems with this interface. It can only watch directories. If one wants to watch many directories,it takes many file descriptors. Moreover,the open file pins the filesystem so that it cannot be unmounted. When something happens it is unknown what,and a? 12.7?inotify(Since 2.6.13.) Inotify is implemented using three new system calls and the usual? int inotify_init(void); int inotify_add_watch (int fd,const char *pathname,int mask); int inotify_rm_watch (int fd,int wd); The first returns a file descriptor:? An inotify_event is defined by struct inotify_event { int wd; /* Watch descriptor */ uint32_t mask; /* Mask of events */ uint32_t cookie; /* Unique cookie associating related events (for rename(2)) */ uint32_t len; /* Size of 'name' field */ char name[]; /* Optional null-terminated name */ }; The? There is a? % ls /proc/sys/fs/inotify/ max_queued_events max_user_instances max_user_watches % cat $_/* 16384 128 8192 Applications are?,??and?. /* inotify demo,mimicking the above dnotify one */ #include (编辑:南平站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- How to allow/block PING on Linux server – IPTables rul
- 鸭嘴兽泰瑞在哪里攻略(我可信赖的密探1-10关,三星通关视频
- linux – 使用systemd服务单元的Restartamp;RestartSec或使
- ipad mini和ipad3有什么区别 ipad mini解析
- linux – 收集和集中来自许多服务器的信息,有点像Puppet的因
- node.js中的fs.lstatSync方法使用说明
- 四大特色带你看Linux内核5.6
- 叉叉连萌助手使用教程
- Linux内核分析 - 网络[十三]:校验和
- linux-kernel – IO-APIC级别与PCI-MSI-X之间的差异