The O_EVTONLY you're using is O_NOCTTY on FreeBSD. https://github.com/etcimon/libasync/blob/ac77a6c68f5f0c2512858d811cb8c959fbf8de41/source/libasync/internals/kqueue.d#L62 I'd suggest to use O_RDONLY on FreeBSD as a replacement. Most of the constants in this file are available in druntime, btw.