Hi,
I have a daemon that watches a certain file for changes then processes the changes made to the file.
But now I've noticed that when I attempt to read the file (using fgets) I get no data. This only happens after a change has been made the file, yet if I attempt to read the file at any other time I can read it fine.
I think another process has the file locked when I try to read it. How can I determine if the file is locked?