现在的使用是用于程序和脚本的通信。
#include <sys/inotify.h>
int inotify_init1(int flags)
支持flag,可设置为IN_NONBLOCK,代码简化
返回为fd
int inotify_add_watch(int fd, const char *pathname, u32 mask)
mask设置监听类型,如IN_MODIFY
fd为初始化的fd
返回为wd
原文:https://www.cnblogs.com/toughcactus/p/14679620.html