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 (编辑:我爱制作网_池州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- linux – Apache Web服务器间歇性地服务403:“Options指令
- iOS7越狱前如何备份重要数据
- linux – PostgreSQL 8.4.4中大型连接查询的性能不佳,尽管有
- 通信产业链厂商期望通过以“抱团”方式,更快走入5G生活方式
- activation lock怎么设置使用 activation lock在哪里
- 在redhat 6.6 64位操作系统中,systemctl命令在哪里?
- linux – 安装amd_catalyst-13.12驱动程序时出错
- iphone背景虚化怎么拍
- linux – 为什么我的cron作业会创建一个带有尾随问号的日志
- 如何在IEEE802.11框架内找到封装协议?

