我了解linux内核提供了“inotify机制”来监控文件系统。
根据inotify,inotify_init()
返回fdinotify_event
从内核接收。(我知道内核会写inotify_event
在上面。)
1)如果我inotify fd
使用 using添加新的手表,当被监视的文件有事件时inotify_add_watch()
,谁将在 inotify fd 上写入。inotify_event
2)(如果内核这样做,)当内核检测到监视文件的事件时,内核如何决定哪个inotifyfd(inotify_instance)
必须用这个更新inotify_event
?