0

I want to use Java 7 WatchService to monitor /proc folder, but that's not working (changes made in the folder are not reported). I've tested other folders such as /home/user/Desktop and /tmp and it works. What could be the reason? Is it because of permissions? /proc is obviously owned by root whereas the other folder is owned by logged in user. The /tmp however is also owned by root, but it works. I'm using this basic implementation to test it.

My OS is Ubuntu 13.10 64bit. Oracle Java 1.7.0_51.

Caballero
  • 11,546
  • 22
  • 103
  • 163

1 Answers1

1

It's because /proc isn't a normal filesystem and therefore doesn't support inotify:

https://unix.stackexchange.com/questions/90627/notify-of-changes-on-a-file-under-proc https://unix.stackexchange.com/questions/74713/how-frequently-is-the-proc-file-system-updated-on-linux?rq=1

Community
  • 1
  • 1
gregsymons
  • 317
  • 2
  • 11