GeezerVison is showing github.com — GitHub - FreeSoaring/WatchInotify: Inotify监听测试
Folders and files
| Name | Name | Last commit message | Last commit date |
|---|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
|
Repository files navigation
| 行为 |
含义 |
掩码 |
对应 |
| IN_ACCESS |
访问 |
0x00000001 |
fgets(buffer, sizeof(buffer), fp) |
| IN_OPEN |
文件被打开 |
0x00000020 |
fopen(filename, "r") |
| IN_ATTRIB |
数据变化 |
0x00000004 |
|
| IN_CLOSE |
文件关闭 |
IN_CLOSE_WRITE | IN_CLOSE_NOWRITE |
close(fd) 未监控到? |
| 调用层 |
读取层 |
结果 |
| root |
root |
可检测 |
| 用户 |
root |
可检测 |
ps top 都会触发 IN_OPEN | IN_ACCESS
修改/proc/sys/fs/inotify/max_user_watches为0
| 修改时间 |
结果 |
| 启动应用前 |
inotify_add_watch err |
| 启动应用后 |
IN_OPEN | IN_ACCESS |
| 获取文件句柄后 |
IN_ACCESS |
#END
About
Inotify监听测试
Resources
Stars
0 stars
Watchers
0 watching
Forks