Subject: "knowing" when a file is available in a directory
To: None <port-i386@netbsd.org>
From: Eric McWhorter <emcwhorter@xsis.xerox.com>
List: port-i386
Date: 10/05/1999 15:49:59
We are working on an application that RIPs postscript.  Basically, a
computer will act as a front-end for a printer.  This particular
printer is not capable of processing postscript, or even text for that
matter.  The printer will basically just take a bunch of ones and
zeros from an external "port" and copy them to a piece of paper.  This
makes the printer fast, and cheap to develop.  Customers will then buy
perhaps multiple front ends for the printer in the form of a computer.

Data for this front end will arrive asynchronously via a network
connection and will be accesible to my app via a disk file.  I have to
assume at this point that I will have no control over the application
that will be receiving data.  If that's not possible then I guess
that's life.

Polling some directory for a new file is out of the question.  There
are a number of userland solutions for producer consumer problems like 
this.  I would like to avoid userland solutions if at all possible,
since I'd like to at least look into using a receiving application
that isn't tightly coupled to the RIP'er.  

Not being especially familiar with the NetBSD kernel, could someone
tell me if there is a way to get some sort of notification in a
userland process from the kernel that a new disk file has been
created?  I could hack some system call in some kludgy way, but I'd
probably do something wrong and I'm hoping there's already some sort
of hook for this sort of thing.

-- 
Eric McWhorter
Xerox Special Information Systems
emcwhorter@xsis.xerox.com