How to use inotify in C?
问题 I searched for questions related to inotify, and this one is somewhat different... I use the following code to monitor change of one file (not directory). In testing, the read() does return when I save the target file which means it works. But event->mask is 32768 which is not IN_MODIFY and name is empty. Another issue: it cannot monitor continuously. When I change the file the second time, it has no response. Thank you for the help! #include <sys/inotify.h> #include <unistd.h> #include