Just a caveat; the device/inode pair is not an assured canonical identity for files on all platforms. The inode concept does not carry to Win32, for example, and will appear as 0 for almost any file on Win32 platforms.
-- [ e d @ h a l l e y . c c ]
Comment on Re: Exclusively updating a file that continues to be repeatedly read