can multiple scripts use inotifywait to watch the same file simultaneously?

287 Views Asked by At

Is there anything about the nature of inotify's inotifywait that would result in unpredictable behavior (or predictable problems) when running two or more scripts that each uses inotifywait to watch the same file or set of files?

Or is it safe/ok, technically, to have multiple scripts using inotifywait on the same files?

1

There are 1 best solutions below

1
Piotr Henryk Dabrowski On BEST ANSWER

Yes, it is safe. inotify is a Linux kernel API which allows concurency.