java - JNotify dosen't recognize Files changed by Linux System -


i using jnotify in 1 of projects on linux system (arm7). , works great. if change, rename, delete or create file throws interrupt. jnotify informed if linux system change file itself. using beaglebone (embeded linux system). there file called value contains status of inputpin (high, low). if file changed system jnotify dosen't work... if change file self ok... know why change wasn't recognize in first case. linux seems use special way write file... yet dont't know how... need interrupt main loop if file changes. or there solution?

thanks

jnotify relies on events file system. linux it's using inotify system call (which inspired it's name). inotify works real file, file described virtual file not exist on disk , not way store information rather easy way access system information , change it).

an alternative solution create sampling thread check file, sleep, , check file again. since care specific file, pretty easy.

while may feel expensive, polling common when dealing directly hardware. since file not file, reading faster reading file.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -