Interesting - I noticed this in /usr/include/bits/fcntl.h the other day (as one does), and wondered whether any of them might be useful:
#ifdef __USE_GNU # define F_SETLEASE 1024 /* Set a lease. */ # define F_GETLEASE 1025 /* Enquire what lease is active. */ # define F_NOTIFY 1026 /* Request notfications on a directory. * +/ #endif
Prompted by your suggestion, I found that these are actually documented in more recent versions of the fcntl(2) manpage than I have, such as in this HTML version.
Unfortunately it notifies only of processes opening or truncating a file, and you have to be the owner of the file (or root), which means it isn't very useful for my current needs.
I see also that there is a fam rpm for my O/S - but while I wasn't able to Google any docs on how to use it, I did find a number of threads about how insecure it was (due to its dependency on portmapper), which makes me reluctant to try it.
Hugo
In reply to Re: Re: nonblocking I/O - testing whether file has more data to read
by hv
in thread nonblocking I/O - testing whether file has more data to read
by hv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |