# post with O_EVTONLY flag??



## icecoke (Jan 4, 2013)

Hi there,

I'm working on a daemon watching several files etc. and because I did such a thing on MacOS I hoped to take over as much as possible to freeBSD. One point I miss in freeBSD is the O_EVTONLY flag for open() I know from MacOS. This would open a file/dir just for getting the events on it with one important benefit: the os does not care about unmounting a file/dir opened with just O_EVTONLY. So e.g. chasing removable disks are easy without killing everything.


Is there a similar way in freeBSD to obtain an file descriptor just for events (just for the system filter EVFILT_VNODE)?

Any helping idea is welcome!
Jimmy


----------

