Opening file to be used with kevent

Ivan Radovanovic radovanovic at gmail.com
Sun Oct 25 19:43:38 UTC 2015


Hi guys,

What are recommended flags to use when opening file descriptor to be 
used later with kevent(2)?

I was thinking to specify O_RDONLY but I guess that would prevent any 
other process from opening file with O_EXCL (and I don't care about file 
contents anyway, I just want to be notified when file is changed). 
Apparently Darwing has O_EVTONLY for this purpose, so I am wondering if 
FreeBSD has something equivalent (or what would be the weakest mode to 
pass to open(2))?

Kind regards,
Ivan


More information about the freebsd-hackers mailing list