up******@gmail.com wrote:
# Hi,
# I have a requirement in which I need to count the number
# of file descriptors associated with a file. To be more clear...A file
# can be opened by several processes say in read only mode. I would like
# to count the number of such file opens on particular file at a given
# instant of time. Any C library function or unix command that can solve
# my problem please...?
No. Some unices provide something like this, some don't; outside of unix,
some do, some don't. Among those that do, there's no standardised
interface.
Perhaps if you're trying to serialise file access, you can try file locking.
--
SM Ryan
http://www.rawbw.com/~wyrmwif/
I hope it feels so good to be right. There's nothing more
exhilirating pointing out the shortcomings of others, is there?