vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Mon, Feb 27, 2006 at 05:14:34PM +0100, Srebrenko Sehic wrote: > On 2/27/06, mickey <mickey@lucifier.net> wrote: > > > On Mon, Feb 27, 2006 at 04:55:43PM +0100, Srebrenko Sehic wrote: > > > Is it possible to trigger a kevent when a mmap'ed file changes? My > > > program works fine for "normal" files, but sits forever in while(1) > > > when watching a mmap'ed file. I just want to know if something changed > > > in the file, i.e. I don't need to read from it. > > > > > > Any pointers? > > > > if you have file mmap(2)ed why would you read(2) from it? > > Well, I have several daemons writing stuff to a circular logfile > (that's my mmap'ed file). Now, I need to pruge the logfile (mmap'ed) > and write it to a database. I don't want to do that from all the > programs (database concurrency issues), but to use a separate program > for that. > > Now, I just need to know when some of the daemons change the logfile. using both mmap and read/write on the same file is not exactly coherent with the current buffer cache design. you can jump the hoops and put all kinds of *sync() confettee around but still be not sure. cu -- paranoic mickey (my employers have changed but, the name has remained) |
| Thread Tools | |
| Display Modes | |
|
|