I was about to write up a group of suggestions that include the notion
that you could use kqueue to watch the directory's vnode, you could use
Erez's stackable file system code to pass all file creates through a
filter, use lpd's spooling mechanism to treat the incoming directory
like a print queue, use a standard issue cron job, etc, etc.  But...

> At present the files are created through procmail like this:
> 
> |/usr/bin/perl $HOME/process_cvs_mail.pl > ~/msgs/$FILE

...this fragment tells me that you are in control of the process of
creating these files.  This makes the whole problem much easier to solve
and side steps the issue of watching the directory altogether.

  In addition to the suggestions above, you could also:

  You could set up the message processing daemon to listen on a named pipe
and send the messages there from the process_cvs_mail script.

  You could handle queue entry with the process_cvs_mail script and
queue exit with your daemon; signal the daemon from the script when 
new work appears in the queue.  This would mirror a threaded work queue
approach that blocks on a a conditional variable until work comes into the
queue.

--
Jack Rusher, Senior Engineer | mailto:[EMAIL PROTECTED]
Integratus, Inc.             | http://www.integratus.com





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to