On Wed, 29 Nov 2006 20:10:54 -0000
"Nico Heinze" <[EMAIL PROTECTED]> wrote:

> I don't know standard functions for this functionality under
> Unix/Linux, but what you could do is to periodically count the number
> of files in a particular directory; this at least will not waste that
> much system resources. But I agree that doing so on a directory with
> let's say 250,000 files takes far more than one second.
> 
> One possible approach might be if you have full control over the file
> handling processes to write your own routines for opening files which
> cache the directories where these files are stored in; then these
> routines could inform every process which wants to be informed e.g.
> utilising a standard Unix signal.

the process that puts files in the directory should signal, or call the
process that sends, or handles the queue. a good example is the qmail
program. it is very well organised.

-- 
Regards, Ed                      :: http://www.usenix.org.uk
just another python person
Mr. T once had to pity himself for wearing his gold chains while 
swimming. He sank to the bottom of the ocean and then ate Moby Dick. 

Reply via email to