kqueue and filenames

Info info at o-notation.org
Tue Jan 24 07:48:02 UTC 2012

Thanks for your reply!

Am 23.01.2012 20:12, schrieb Pieter de Goeje:
>> kevent is triggered when a file is renamed. How do I get the new name?
>> Is there an extra function? In the moment, I see only the possibility
>> by searching the filesystem(folder) for a new name.
> A good question to which I unfortunately do not have the answer to. I
> think in principle it is impossible to get the file name by file
> descriptor alone (it could have multiple names). In practice I would
> just treat NOTE_RENAME as a sequence of unlink/link. I believe tools
> like lsof use the system name cache to map fds to names, but that is not
> very reliable.

Ok, then it's a new challenge! I was hoping, that there's a more 
comfortable way to obtain the new filename.


More information about the freebsd-questions mailing list