Skip to contentSkip to conversation

File and Directory Change Notifications

DISCUSSION Joseph D. Wagner 2 participants 2 messages Jan 23, 2004 VFS

lore
Share & tools
lore
#0 lore raw

I want to use file and directory change notifications to see if any other process has changed a file that I have open. Can Linux distinguish between different processes modifying the same file for these purposes? Or will I receive change notifications when my own process changes the file?

TIA.

Joseph D. Wagner

#1 lore raw
Quoted 4 lines · Joseph D. Wagner

I want to use file and directory change notifications to see if any other process has changed a file that I have open. Can Linux distinguish between different processes modifying the same file for these purposes? Or will I receive change notifications when my own process changes the file?

IMO, the process registering for notification will receive that irrespective of who is modifying the file. You can try the example given in Documentation/dnotify.txt in kernel source tree.

Maneesh

Signature · 6 lines
Maneesh Soni
Linux Technology Center, 
IBM Software Lab, Bangalore, India
email: [email protected]
Phone: 91-80-5044999 Fax: 91-80-5268553
T/L : 9243696