tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Kqueue and Fifos



Hello,


Is there any historical or technical reason for FIFOs not responding to EVFILT_VNODE filter from kqueue?
Looks like NetBSD accepts only EVFILT_READ/WRITE in fifo_kqfilter() in fifo_vnops.c, which is what I see in my tests (kevent() registration returns EINVAL). 

FreeBSD and OpenBSD behave similarly and both explicitly disallow VNODE in respective fifofs code.

In contrast, Darwin accepts VNODE events for Fifos just fine. E.g. deleting a Fifo will raise NOTE_DELETE | NOTE_LINK flags. Darwin's BSD subsystem does not actively forbid EVFILT_NODE events for fifofs (but not easy to follow through from that sparse XNU code drop they occasionally do).

I couldn't find anything to suggest how Fifos should really behave in this context. Has Apple gone a step further, maybe their FIFO implementation is fundamentally different (and slow!), or has FIFO support on vnode level for kqueue never been planned originally, due to technical reasons or maybe just an oversight? (Subsequently, is this something that could be added to NetBSD?)


Thanks for any input,

Bojan



Home | Main Index | Thread Index | Old Index